com.sun.im.provider
Interface Redirector
- public interface Redirector
A redirector tells whether a session should be redirected to another host
and if so what is the redirection target.
Field Summary |
static java.lang.String |
REJECTED
Indicates that the set of user data has been rejected (invalid/unavailable/etc).
|
Method Summary |
java.util.List |
getOtherHost(java.net.InetAddress client,
java.lang.String uid,
java.lang.String domain)
If the combination of user id and domain should be redirected
to a host different than this one, return this host. |
REJECTED
public static final java.lang.String REJECTED
- Indicates that the set of user data has been rejected (invalid/unavailable/etc).
Returning this will result in a stream error asking for session termination.
If there are more than one entry in the returned list which contains this , redirect server will attempt to use
the other servers - and will apply the semantics of this entry only if it finds no valid/available host.
- See Also:
- Constant Field Values
getOtherHost
public java.util.List getOtherHost(java.net.InetAddress client,
java.lang.String uid,
java.lang.String domain)
- If the combination of user id and domain should be redirected
to a host different than this one, return this host.
- Parameters:
domain
- user domain. This argument
may be null if the user domain has not yet been gathered by the
server. No domain-based check is done in this case.uid
- unique user id within the domain. This argument
may be null if the user id has not yet been gathered by the
server. No uid based check is done in this case.client
- internet address the client is connecting from.
This attribute may be null if it is unknown by the access point
- Returns:
- List of host to redirect to : the priority of hosts picked up will be in the
increasing order in which they appear in the list.
This could be null in case this set of input is not handled.
In case there are 'REJECTED' or 'NO_HOST_AVAILABLE' entries , server continues to traverse the
entire list looking for alternate valid/available hosts and upon finding none , serverthe semantics of
'REJECTED' followed by 'NO_HOST_AVAILABLE' (pnly depending on their presence - not dependent on their order) are applied.