james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harmeet Bedi" <hb...@yahoo.com>
Subject Question or or Request to change mailet/MailetContext
Date Fri, 16 Mar 2001 03:31:22 GMT
The mailet/MailetContext contains these methods
--------------------------------------------------------------------------
1)
/**
 * Returns a Collection of the server names that are considered "local"
 * by this mailet context.
 */
Collection getServerNames();

2)
/**
 * Returns a Collection of the local user accounts within this mailet
 * context.
 */
Collection getLocalUsers();



These methods are used to check if a server is local or if a user is local.
I think it would be better 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 would be
------------------------------------------
- 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.


The changes/impact would be minimal.
------------------------------------------------------------
1)
/** Checks if a server is considered local by the mailet context. */
boolean isLocalServer(String name);

would require these changes
a) james/transport/mailets/PostmasterAlias would need to be changed. It
would be simpler, because it determines from context if host in postmaster
address is a local server.
b) james/transport/matchers/HostIsLocal would need to be changed. It would
be simpler, because it determines if a host is local.
b) james/transport/matchers/RecipientIsLocal would need to be changed. It
would be simpler, because it determines if the host in recipient address is
local.

2)
/** Checks if a user account is considered local by the mailet context. */
boolean isLocalUser(String userAccount);
would require these changes

a) james/transport/matchers/RecipientIsLocal would need to be changed. It
would be simpler, because it basically determines from context if a user is
local.



If this makes sense, would someone fix this, or I can do this and send
modified files.
If not, what are the disadvantages.

thanks,
Harmeet



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message