org.apache.james.imapserver
Class SimpleSystem
java.lang.Object
|
+--org.apache.james.imapserver.SimpleSystem
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, IMAPSystem, org.apache.avalon.framework.activity.Initializable
- public class SimpleSystem
- extends java.lang.Object
- implements IMAPSystem, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.activity.Initializable
A simple, single-server, implementation of IMAPSystem.
References: rfc 2060, rfc 2193, rfc 2221
- Version:
- 0.1 on 14 Dec 2000
- Author:
- Charles Benett
Method Summary |
void |
compose(org.apache.avalon.framework.component.ComponentManager comp)
|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
void |
contextualize(org.apache.avalon.framework.context.Context context)
|
java.util.Iterator |
getAccessibleServers(java.lang.String username)
Returns an iterator over the collection of servers on which this user
has access. |
java.lang.String |
getHierarchySeperator(java.lang.String namespace)
Returns the character used as a mail hierarchy seperator in a given
namespace. |
java.lang.String |
getHomeServer(java.lang.String username)
Returns the home server (server with user's INBOX) for specified user. |
java.lang.String |
getNamespaces(java.lang.String username)
Provides the set of namesapces a given user can access. |
java.lang.String |
getNamespaceToken()
Returns the token indicating a namespace. |
void |
initialize()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSystem
public SimpleSystem()
configure
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Specified by:
configure
in interface org.apache.avalon.framework.configuration.Configurable
contextualize
public void contextualize(org.apache.avalon.framework.context.Context context)
- Specified by:
contextualize
in interface org.apache.avalon.framework.context.Contextualizable
compose
public void compose(org.apache.avalon.framework.component.ComponentManager comp)
- Specified by:
compose
in interface org.apache.avalon.framework.component.Composable
initialize
public void initialize()
throws java.lang.Exception
- Specified by:
initialize
in interface org.apache.avalon.framework.activity.Initializable
getNamespaceToken
public java.lang.String getNamespaceToken()
- Returns the token indicating a namespace. Implementation dependent but
by convention, '#'.
Example: #news.org.apache vs #mail.org.apache
- Specified by:
getNamespaceToken
in interface IMAPSystem
getHomeServer
public java.lang.String getHomeServer(java.lang.String username)
throws AuthenticationException
- Returns the home server (server with user's INBOX) for specified user.
Enables Login Referrals per RFC2221. (Ie user attempts to login to a
server which is not their Home Server.) The returned string must comply
with RFC2192, IMAP URL Scheme.
- Specified by:
getHomeServer
in interface IMAPSystem
- Parameters:
username
- String representation of a user- Throws:
AuthenticationException
- if this System does not recognise
the user.
getHierarchySeperator
public java.lang.String getHierarchySeperator(java.lang.String namespace)
- Returns the character used as a mail hierarchy seperator in a given
namespace. A namespace must use the same seperator at all levels of
hierarchy.
Recommendations (from rfc 2683) are period (US)/ full stop (Brit),
forward slash or backslash.
- Specified by:
getHierarchySeperator
in interface IMAPSystem
- Parameters:
namespace
- String identifying a namespace
getNamespaces
public java.lang.String getNamespaces(java.lang.String username)
- Provides the set of namesapces a given user can access. Implementations
should but are not required to reveal all namespaces that a user can
access. Different namespaces may be handled by different
IMAPHosts
- Specified by:
getNamespaces
in interface IMAPSystem
- Parameters:
username
- String identifying a user of this System
getAccessibleServers
public java.util.Iterator getAccessibleServers(java.lang.String username)
- Returns an iterator over the collection of servers on which this user
has access. The collection should be unmodifiable.
Enable Mailbox Referrals - RFC 2193.
- Specified by:
getAccessibleServers
in interface IMAPSystem
- Parameters:
username
- String identifying a user- Returns:
- iterator over a collection of strings
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.