public static class HttpSession.HttpVirtualConnection extends VirtualConnection
Connection.ClientAuth, Connection.CompressionPolicy, Connection.State, Connection.TLSPolicy
session
Constructor and Description |
---|
HttpSession.HttpVirtualConnection(InetAddress address) |
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, removeCloseListener, setCompressionPolicy, setFlashClient, setTlsPolicy, setUsingSelfSignedCertificate, setXMPPVersion, startCompression, startTLS, startTLS, validate
public HttpSession.HttpVirtualConnection(InetAddress address)
public void closeVirtualConnection()
VirtualConnection
closeVirtualConnection
in class VirtualConnection
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 deliver(org.xmpp.packet.Packet packet) throws UnauthorizedException
Connection
socket.send(packet.getWriteBuffer())
.packet
- the packet to deliver.UnauthorizedException
- if a permission error was detected.public void deliverRawText(String text)
Connection
Connection.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()
Connection
public Certificate[] getPeerCertificates()
Connection
X509Certificate
for
the connection of the peer.getPeerCertificates
in interface Connection
getPeerCertificates
in class VirtualConnection
Copyright © 2003-2008 Jive Software.