Class RemoteOutgoingServerSession
- java.lang.Object
-
- org.jivesoftware.openfire.session.RemoteSession
-
- org.jivesoftware.openfire.session.RemoteOutgoingServerSession
-
- All Implemented Interfaces:
ChannelHandler<org.xmpp.packet.Packet>
,RoutableChannelHandler
,OutgoingServerSession
,ServerSession
,Session
public class RemoteOutgoingServerSession extends RemoteSession implements OutgoingServerSession
Surrogate for outgoing server sessions hosted in some remote cluster node.- Author:
- Gaston Dombiak
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jivesoftware.openfire.session.ServerSession
ServerSession.AuthenticationMethod
-
Nested classes/interfaces inherited from interface org.jivesoftware.openfire.session.Session
Session.Status
-
-
Field Summary
-
Fields inherited from class org.jivesoftware.openfire.session.RemoteSession
address, nodeID, streamID
-
Fields inherited from interface org.jivesoftware.openfire.session.Session
Log, MAJOR_VERSION, MINOR_VERSION
-
-
Constructor Summary
Constructors Constructor Description RemoteOutgoingServerSession(byte[] nodeID, DomainPair address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOutgoingDomainPair(DomainPair domainPair)
Marks a domain pair as being authenticated.boolean
authenticateSubdomain(DomainPair domainPair)
Authenticates a subdomain of this server with the specified remote server over an existing outgoing connection.boolean
checkOutgoingDomainPair(DomainPair domainPair)
Checks to see if a pair of domains has previously been authenticated.ServerSession.AuthenticationMethod
getAuthenticationMethod()
Obtain method that was used to authenticate this session.Collection<DomainPair>
getOutgoingDomainPairs()
Obtains all authenticated domain pairs.-
Methods inherited from class org.jivesoftware.openfire.session.RemoteSession
close, deliverRawText, doClusterTask, doSynchronousClusterTask, getAddress, getCipherSuiteName, getCreationDate, getHostAddress, getHostName, getLanguage, getLastActiveDate, getNumClientPackets, getNumServerPackets, getPeerCertificates, getServerName, getSoftwareVersion, getStatus, getStreamID, getTLSProtocolName, isClosed, isEncrypted, process, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.openfire.session.ServerSession
isUsingSaslExternal, isUsingServerDialback
-
Methods inherited from interface org.jivesoftware.openfire.session.Session
close, deliverRawText, getAddress, getCipherSuiteName, getCreationDate, getHostAddress, getHostName, getLanguage, getLastActiveDate, getNumClientPackets, getNumServerPackets, getPeerCertificates, getServerName, getSoftwareVersion, getStatus, getStreamID, getTLSProtocolName, isAuthenticated, isClosed, isEncrypted, process, validate
-
-
-
-
Constructor Detail
-
RemoteOutgoingServerSession
public RemoteOutgoingServerSession(byte[] nodeID, DomainPair address)
-
-
Method Detail
-
getOutgoingDomainPairs
public Collection<DomainPair> getOutgoingDomainPairs()
Description copied from interface:OutgoingServerSession
Obtains all authenticated domain pairs. Most callers should avoid accessing this and use a simple check as above.- Specified by:
getOutgoingDomainPairs
in interfaceOutgoingServerSession
- Returns:
- collection of authenticated DomainPairs
-
addOutgoingDomainPair
public void addOutgoingDomainPair(@Nonnull DomainPair domainPair)
Description copied from interface:OutgoingServerSession
Marks a domain pair as being authenticated.- Specified by:
addOutgoingDomainPair
in interfaceOutgoingServerSession
- Parameters:
domainPair
- the local and remote domain for which authentication has been established.
-
authenticateSubdomain
public boolean authenticateSubdomain(@Nonnull DomainPair domainPair)
Description copied from interface:OutgoingServerSession
Authenticates a subdomain of this server with the specified remote server over an existing outgoing connection. If the existing session was using server dialback then a new db:result is going to be sent to the remote server. But if the existing session was TLS+SASL based then just assume that the subdomain was authenticated by the remote server.- Specified by:
authenticateSubdomain
in interfaceOutgoingServerSession
- Parameters:
domainPair
- the local (sub) and remote domain for which authentication is to be established.- Returns:
- True if the domain was authenticated by the remote server.
-
getAuthenticationMethod
public ServerSession.AuthenticationMethod getAuthenticationMethod()
Description copied from interface:ServerSession
Obtain method that was used to authenticate this session. Null when the session is not authenticated.- Specified by:
getAuthenticationMethod
in interfaceServerSession
- Returns:
- the method used for authentication (possibly null).
-
checkOutgoingDomainPair
public boolean checkOutgoingDomainPair(@Nonnull DomainPair domainPair)
Description copied from interface:OutgoingServerSession
Checks to see if a pair of domains has previously been authenticated. Since domains are authenticated as pairs, authenticating A->B does not imply anything about A-->C or D->B.- Specified by:
checkOutgoingDomainPair
in interfaceOutgoingServerSession
- Parameters:
domainPair
- the local and remote domain for which the check is executed.- Returns:
- True if the pair of domains has been authenticated.
-
-