|
Wildfire 3.2.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.wildfire.session.Session org.jivesoftware.wildfire.session.OutgoingServerSession
public class OutgoingServerSession
Server-to-server communication is done using two TCP connections between the servers. One connection is used for sending packets while the other connection is used for receiving packets. The OutgoingServerSession represents the connection to a remote server that will only be used for sending packets.
Currently only the Server Dialback method is being used for authenticating with the remote
server. Use authenticateDomain(String, String)
to create a new connection to a remote
server that will be used for sending packets to the remote server from the specified domain.
Only the authenticated domains with the remote server will be able to effectively send packets
to the remote server. The remote server will reject and close the connection if a
non-authenticated domain tries to send a packet through this connection.
Once the connection has been established with the remote server and at least a domain has been authenticated then a new route will be added to the routing table for this connection. For optimization reasons the same outgoing connection will be used even if the remote server has several hostnames. However, different routes will be created in the routing table for each hostname of the remote server.
Field Summary |
---|
Fields inherited from class org.jivesoftware.wildfire.session.Session |
---|
authToken, CHARSET, conn, MAJOR_VERSION, MINOR_VERSION, sessionManager, status, STATUS_AUTHENTICATED, STATUS_CLOSED, STATUS_CONNECTED, STATUS_STREAMING |
Constructor Summary | |
---|---|
OutgoingServerSession(String serverName,
Connection connection,
OutgoingServerSocketReader socketReader,
StreamID streamID)
|
Method Summary | |
---|---|
void |
addAuthenticatedDomain(String domain)
Adds a new authenticated domain, subdomain or virtual host to the list of authenticated domains for the remote server. |
static boolean |
authenticateDomain(String domain,
String hostname)
Creates a new outgoing connection to the specified hostname if no one exists. |
Collection<String> |
getAuthenticatedDomains()
Returns a collection with all the domains, subdomains and virtual hosts that where authenticated. |
String |
getAvailableStreamFeatures()
Returns a text with the available stream features. |
Collection<String> |
getHostnames()
Returns the list of hostnames related to the remote server. |
void |
removeAuthenticatedDomain(String domain)
Removes an authenticated domain from the list of authenticated domains. |
Methods inherited from class org.jivesoftware.wildfire.session.Session |
---|
decodeVersion, getAddress, getConnection, getCreationDate, getLastActiveDate, getNumClientPackets, getNumServerPackets, getServerName, getSessionData, getStatus, getStreamID, incrementClientPacketCount, incrementServerPacketCount, process, removeSessionData, setAddress, setSessionData, setStatus, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OutgoingServerSession(String serverName, Connection connection, OutgoingServerSocketReader socketReader, StreamID streamID)
Method Detail |
---|
public static boolean authenticateDomain(String domain, String hostname)
The Server Dialback method is currently the only implemented method for server-to-server
authentication. This implies that the remote server will ask the Authoritative Server
to verify the domain to authenticate. Most probably this server will act as the
Authoritative Server. See IncomingServerSession
for more information.
domain
- the local domain to authenticate with the remote server.hostname
- the hostname of the remote server.
public Collection<String> getAuthenticatedDomains()
public void addAuthenticatedDomain(String domain)
domain
- the new authenticated domain, subdomain or virtual host to add.public void removeAuthenticatedDomain(String domain)
domain
- the domain, subdomain or virtual host to remove from the list of
authenticated domains.public Collection<String> getHostnames()
public String getAvailableStreamFeatures()
Session
getAvailableStreamFeatures
in class Session
|
Wildfire 3.2.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |