|
Openfire 3.8.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.net.VirtualConnection org.jivesoftware.openfire.multiplex.ClientSessionConnection
public class ClientSessionConnection
Represents a connection of a Client Session that was established to a Connection Manager.
Connection Managers have their own physical connections to the server that are multiplexed
among connected clients. Each created ClientSession
will use an instance of this class as its connection.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jivesoftware.openfire.Connection |
---|
Connection.ClientAuth, Connection.CompressionPolicy, Connection.TLSPolicy |
Field Summary |
---|
Fields inherited from class org.jivesoftware.openfire.net.VirtualConnection |
---|
session |
Constructor Summary | |
---|---|
ClientSessionConnection(String connectionManagerName,
String hostName,
String hostAddress)
|
Method Summary | |
---|---|
void |
closeVirtualConnection()
If the Connection Manager or the Client requested to close the connection then just do nothing. |
void |
deliver(org.xmpp.packet.Packet packet)
Delivers the packet to the Connection Manager that in turn will forward it to the target user. |
void |
deliverRawText(String text)
Delivers the stanza to the Connection Manager that in turn will forward it to the target user. |
byte[] |
getAddress()
Returns the raw IP address of this InetAddress
object. |
String |
getHostAddress()
Returns the IP address string in textual presentation. |
String |
getHostName()
Gets the host name for this IP address. |
void |
systemShutdown()
Notification message indicating that the server is being shutdown. |
Methods inherited from class org.jivesoftware.openfire.net.VirtualConnection |
---|
addCompression, close, getCompressionPolicy, getLanguage, getLocalCertificates, getMajorXMPPVersion, getMinorXMPPVersion, getPacketDeliverer, getPeerCertificates, getTlsPolicy, init, isClosed, isCompressed, isFlashClient, isSecure, isUsingSelfSignedCertificate, registerCloseListener, removeCloseListener, setCompressionPolicy, setFlashClient, setLanaguage, setTlsPolicy, setUsingSelfSignedCertificate, setXMPPVersion, startCompression, startTLS, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientSessionConnection(String connectionManagerName, String hostName, String hostAddress)
Method Detail |
---|
public void deliver(org.xmpp.packet.Packet packet)
If the packet to send does not have a TO attribute then wrap the packet with a special IQ packet. The wrapper IQ packet will be sent to the Connection Manager and the stream ID of this Client Session will be used for identifying that the wrapped packet must be sent to the connected user. Since some packets can be exchanged before the user has a binded JID we need to use the stream ID as the unique identifier.
packet
- the packet to send to the user.public void deliverRawText(String text)
The stanza to send wrapped with a special IQ packet. The wrapper IQ packet will be sent to the Connection Manager and the stream ID of this Client Session will be used for identifying that the wrapped stanza must be sent to the connected user.
text
- the stanza to send to the user.public byte[] getAddress() throws UnknownHostException
Connection
InetAddress
object. The result is in network byte order: the highest order
byte of the address is in getAddress()[0]
.
UnknownHostException
- if IP address of host could not be determined.public String getHostAddress() throws UnknownHostException
Connection
UnknownHostException
- if IP address of host could not be determined.public String getHostName() throws UnknownHostException
Connection
If this InetAddress was created with a host name,
this host name will be remembered and returned;
otherwise, a reverse name lookup will be performed
and the result will be returned based on the system
configured name lookup service. If a lookup of the name service
is required, call
getCanonicalHostName
.
If there is a security manager, its
checkConnect
method is first called
with the hostname and -1
as its arguments to see if the operation is allowed.
If the operation is not allowed, it will return
the textual representation of the IP address.
UnknownHostException
- if IP address of host could not be determined.InetAddress.getCanonicalHostName()
,
SecurityManager.checkConnect(java.lang.String, int)
public void systemShutdown()
Connection
public void closeVirtualConnection()
closeVirtualConnection
in class VirtualConnection
|
Openfire 3.8.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |