org.mortbay.jetty.plus
Class MailService

java.lang.Object
  extended by org.mortbay.jetty.plus.AbstractService
      extended by org.mortbay.jetty.plus.MailService
All Implemented Interfaces:
java.util.Map, Service, LifeCycle

public class MailService
extends AbstractService
implements java.util.Map

MailService.java Created: Fri May 30 09:25:47 2003

Version:
1.0
Author:
Jan Bartel

Nested Class Summary
 class MailService.MailAuthenticator
           
static class MailService.SessionObjectFactory
           
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
protected  javax.naming.spi.ObjectFactory _objectFactory
           
protected  java.lang.String _password
           
protected  java.util.Properties _sessionProperties
           
protected  java.lang.String _user
           
static java.lang.String DEFAULT_MAIL_JNDI
           
 
Fields inherited from class org.mortbay.jetty.plus.AbstractService
_jndi, _name, _started
 
Constructor Summary
MailService()
           
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set entrySet()
           
 boolean equals(java.lang.Object o)
           
 java.lang.Object get(java.lang.Object key)
           
protected  java.lang.String getPassword()
           
 java.lang.String getUser()
           
 int hashCode()
           
 boolean isEmpty()
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map t)
           
 java.lang.Object remove(java.lang.Object key)
           
 void setPassword(java.lang.String pwd)
           
 void setUser(java.lang.String user)
           
 int size()
           
 void start()
          Create a Session and bind to JNDI
 void stop()
          Stop the LifeCycle.
 java.util.Collection values()
           
 
Methods inherited from class org.mortbay.jetty.plus.AbstractService
getJNDI, getName, isStarted, setJNDI, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAIL_JNDI

public static final java.lang.String DEFAULT_MAIL_JNDI
See Also:
Constant Field Values

_sessionProperties

protected java.util.Properties _sessionProperties

_user

protected java.lang.String _user

_password

protected java.lang.String _password

_objectFactory

protected javax.naming.spi.ObjectFactory _objectFactory
Constructor Detail

MailService

public MailService()
Method Detail

setUser

public void setUser(java.lang.String user)

getUser

public java.lang.String getUser()

setPassword

public void setPassword(java.lang.String pwd)

getPassword

protected java.lang.String getPassword()

clear

public void clear()
Specified by:
clear in interface java.util.Map

size

public int size()
Specified by:
size in interface java.util.Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map

putAll

public void putAll(java.util.Map t)
Specified by:
putAll in interface java.util.Map

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Map
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map
Overrides:
hashCode in class java.lang.Object

start

public void start()
           throws java.lang.Exception
Create a Session and bind to JNDI

Specified by:
start in interface Service
Specified by:
start in interface LifeCycle
Overrides:
start in class AbstractService
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.InterruptedException
Description copied from interface: Service
Stop the LifeCycle. The LifeCycle may wait for current activities to complete normally, but it can be interrupted.

Specified by:
stop in interface Service
Specified by:
stop in interface LifeCycle
Overrides:
stop in class AbstractService
Throws:
java.lang.InterruptedException - Stopping a lifecycle is rarely atomic and may be interrupted by another thread. If this happens InterruptedException is throw and the component will be in an indeterminant state and should probably be discarded.


Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.