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
  • Constructor Details

    • RemoteOutgoingServerSession

      public RemoteOutgoingServerSession(byte[] nodeID, DomainPair address)
  • Method Details

    • 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 interface OutgoingServerSession
      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 interface OutgoingServerSession
      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 interface OutgoingServerSession
      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 interface ServerSession
      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 interface OutgoingServerSession
      Parameters:
      domainPair - the local and remote domain for which the check is executed.
      Returns:
      True if the pair of domains has been authenticated.