You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by hb...@apache.org on 2001/03/31 04:34:35 UTC
cvs commit: jakarta-james/src/org/apache/mailet MailetContext.java
hbedi 01/03/30 18:34:35
Modified: src/org/apache/mailet MailetContext.java
Log:
The mailet/MailetContext exposed these methods to determine if server/user is local
--------------------------------------------------------------------------
1)
Collection getServerNames();
2)
Collection getLocalUsers();
Changed API to have these methods instead
------------------------------------------------------------------
1)
/** Checks if a server is considered local by the mailet context. */
boolean isLocalServer(String name);
2)
/** Checks if a user account is considered local by the mailet context. */
boolean isLocalUser(String userAccount);
The advantage are
------------------------------------------
- allows the MailetContext to hide and possibly plugin alternate strategy
for the local server name and user check.
- The entire collection is never exposed, only a way to ask if an entity
exists in the collection. This could have scalability benefits.
Revision Changes Path
1.5 +8 -8 jakarta-james/src/org/apache/mailet/MailetContext.java
Index: MailetContext.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/mailet/MailetContext.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MailetContext.java 2001/03/05 15:00:59 1.4
+++ MailetContext.java 2001/03/31 02:34:35 1.5
@@ -127,20 +127,20 @@
String getServerInfo();
/**
- * Returns a Collection of the server names that are considered "local"
- * by this mailet context.
+ * Checks if a server is serviced by mail context
*
- * @return a Collection of Strings of hostnames that are considered "local"
+ * @param serverName - name of server.
+ * @return true if server is local, i.e. serviced by this mail context
*/
- Collection getServerNames();
+ boolean isLocalServer(String serverName);
/**
- * Returns a Collection of the local user accounts within this mailet
- * context.
+ * Checks if a user account is exists in the mail context.
*
- * @return a Collection of Strings of usernames that are considered "local"
+ * @param userAccount - user identifier.
+ * @return true if the acount is a local account
*/
- Collection getLocalUsers();
+ boolean isLocalUser(String userAccount);
/**
* Writes the specified message to a mailet log file, usually an event
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org