org.apache.struts.examples.mailreader.memory
Class MemorySubscription

java.lang.Object
  |
  +--org.apache.struts.examples.mailreader.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: 54929 $ $Date: 2004-10-16 09:38:42 -0700 (Sat, 16 Oct 2004) $

Field Summary
private  boolean autoConnect
          Should we auto-connect at startup time?
private  java.lang.String host
          The mail host for this subscription.
private  java.lang.String password
          The password (in clear text) for this subscription.
private  java.lang.String type
          The subscription type ("imap" or "pop3").
private  MemoryUser user
          The User with which we are associated.
private  java.lang.String username
          The username for this subscription.
 
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, registerNatives, wait, wait, wait
 

Field Detail

host

private java.lang.String host
The mail host for this subscription.

user

private MemoryUser user
The User with which we are associated.

autoConnect

private boolean autoConnect
Should we auto-connect at startup time?

password

private java.lang.String password
The password (in clear text) for this subscription.

type

private java.lang.String type
The subscription type ("imap" or "pop3").

username

private java.lang.String username
The username for this subscription.
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
Following copied from interface: org.apache.struts.examples.mailreader.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
Following copied from interface: org.apache.struts.examples.mailreader.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
Following copied from interface: org.apache.struts.examples.mailreader.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
Following copied from interface: org.apache.struts.examples.mailreader.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 © 2003-2004 - The Apache Software Foundation