org.apache.struts.webapp.example.memory
Class MemorySubscription

java.lang.Object
  extended by org.apache.struts.webapp.example.memory.MemorySubscription
All Implemented Interfaces:
Subscription

public final class MemorySubscription
extends java.lang.Object
implements Subscription

Concrete implementation of Subscription for an in-memory database backed by an XML data file.

Since:
Struts 1.1
Version:
$Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $
Author:
Craig R. McClanahan

Constructor Summary
MemorySubscription(MemoryUser user, java.lang.String host)
          Construct a new Subscription associated with the specified User.
 
Method Summary
 boolean getAutoConnect()
          Return the auto-connect flag.
 java.lang.String getHost()
          The mail host for this subscription.
 java.lang.String getPassword()
          Return the password.
 java.lang.String getType()
          Return the subscription type.
 User getUser()
          The User owning this Subscription.
 java.lang.String getUsername()
          Return the username.
 void setAutoConnect(boolean autoConnect)
          Set the auto-connect flag.
 void setPassword(java.lang.String password)
          Set the password.
 void setType(java.lang.String type)
          Set the subscription type.
 void setUsername(java.lang.String username)
          Set the username.
 java.lang.String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemorySubscription

public MemorySubscription(MemoryUser user,
                          java.lang.String host)

Construct a new Subscription associated with the specified User.

Parameters:
user - The user with which we are associated
host - The mail host for this subscription
Method Detail

getAutoConnect

public boolean getAutoConnect()
Description copied from interface: Subscription
Return the auto-connect flag.

Specified by:
getAutoConnect in interface Subscription

setAutoConnect

public void setAutoConnect(boolean autoConnect)
Description copied from interface: Subscription
Set the auto-connect flag.

Specified by:
setAutoConnect in interface Subscription
Parameters:
autoConnect - The new auto-connect flag

getHost

public java.lang.String getHost()
The mail host for this subscription.

Specified by:
getHost in interface Subscription

getPassword

public java.lang.String getPassword()
Description copied from interface: Subscription
Return the password.

Specified by:
getPassword in interface Subscription

setPassword

public void setPassword(java.lang.String password)
Description copied from interface: Subscription
Set the password.

Specified by:
setPassword in interface Subscription
Parameters:
password - The new password

getType

public java.lang.String getType()
Description copied from interface: Subscription
Return the subscription type.

Specified by:
getType in interface Subscription

setType

public void setType(java.lang.String type)
Description copied from interface: Subscription
Set the subscription type.

Specified by:
setType in interface Subscription
Parameters:
type - The new subscription type

getUser

public User getUser()
The User owning this Subscription.

Specified by:
getUser in interface Subscription

getUsername

public java.lang.String getUsername()
Description copied from interface: Subscription
Return the username.

Specified by:
getUsername in interface Subscription

setUsername

public void setUsername(java.lang.String username)
Description copied from interface: Subscription
Set the username.

Specified by:
setUsername in interface Subscription
Parameters:
username - The new username

toString

public java.lang.String toString()
Return a String representation of this object.

Overrides:
toString in class java.lang.Object


Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.