public static class HttpSession.HttpVirtualConnection extends VirtualConnection
Connection.ClientAuth, Connection.CompressionPolicy, Connection.State, Connection.TLSPolicysession| Constructor and Description |
|---|
HttpVirtualConnection(InetAddress address) |
HttpVirtualConnection(InetAddress address,
ConnectionType connectionType) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeVirtualConnection()
Closes the virtual connection.
|
void |
deliver(org.xmpp.packet.Packet packet)
Delivers the packet to this connection without checking the recipient.
|
void |
deliverRawText(String text)
Delivers raw text to this connection.
|
byte[] |
getAddress()
Returns the raw IP address of this
InetAddress
object. |
ConnectionConfiguration |
getConfiguration()
Returns a representation of the desired state for this connection.
|
String |
getHostAddress()
Returns the IP address string in textual presentation.
|
String |
getHostName()
Gets the host name for this IP address.
|
Certificate[] |
getPeerCertificates()
Returns the underlying
X509Certificate for
the connection of the peer. |
void |
systemShutdown()
Notification message indicating that the server is being shutdown.
|
addCompression, close, getCompressionPolicy, getLocalCertificates, getMajorXMPPVersion, getMinorXMPPVersion, getPacketDeliverer, getTlsPolicy, init, isClosed, isCompressed, isFlashClient, isSecure, isUsingSelfSignedCertificate, registerCloseListener, reinit, removeCloseListener, setCompressionPolicy, setFlashClient, setTlsPolicy, setUsingSelfSignedCertificate, setXMPPVersion, startCompression, startTLS, startTLS, validatepublic HttpVirtualConnection(InetAddress address)
public HttpVirtualConnection(InetAddress address, ConnectionType connectionType)
public void closeVirtualConnection()
VirtualConnectioncloseVirtualConnection in class VirtualConnectionpublic byte[] getAddress()
throws UnknownHostException
ConnectionInetAddress
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
ConnectionUnknownHostException - if IP address of host could not be determined.public String getHostName() throws UnknownHostException
ConnectionIf 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()
Connectionpublic void deliver(org.xmpp.packet.Packet packet)
throws UnauthorizedException
Connectionsocket.send(packet.getWriteBuffer()).packet - the packet to deliver.UnauthorizedException - if a permission error was detected.public void deliverRawText(String text)
ConnectionConnection.deliver(org.xmpp.packet.Packet).This method avoids having to get the writer of this connection and mess directly with the writer. Therefore, this method ensures a correct delivery of the stanza even if other threads were sending data concurrently.
text - the XML stanzas represented kept in a String.public ConnectionConfiguration getConfiguration()
Connectionpublic Certificate[] getPeerCertificates()
ConnectionX509Certificate for
the connection of the peer.getPeerCertificates in interface ConnectiongetPeerCertificates in class VirtualConnectionCopyright © 2003-2008 Jive Software.