Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.http
Class HttpSession.HttpVirtualConnection

    java.lang.Object
      org.jivesoftware.openfire.net.VirtualConnection
          org.jivesoftware.openfire.http.HttpSession.HttpVirtualConnection

All Implemented Interfaces:
  Connection

Enclosing class:
  HttpSession

    public static class HttpSession.HttpVirtualConnection

extends VirtualConnection

A virtual server connection relates to a http session which its self can relate to many http connections.

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
`HttpSession.HttpVirtualConnection(InetAddress address)`

Method Summary
`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.
`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.

Methods inherited from class org.jivesoftware.openfire.net.VirtualConnection
`addCompression, close, getCompressionPolicy, getLanguage, getLocalCertificates, getMajorXMPPVersion, getMinorXMPPVersion, getPacketDeliverer, 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

### HttpSession.HttpVirtualConnection

    public HttpSession.HttpVirtualConnection(InetAddress address)

Method Detail

### closeVirtualConnection

    public void closeVirtualConnection()

  Description copied from class: `VirtualConnection`
  Closes the virtual connection. Subsclasses should indicate what closing a virtual connection means. At this point the session has a CLOSED state.

  Specified by:
    `closeVirtualConnection` in class `VirtualConnection`

### getAddress

    public byte[] getAddress()
                      throws UnknownHostException

  Description copied from interface: `Connection`
  Returns the raw IP address of this `InetAddress` object. The result is in network byte order: the highest order byte of the address is in `getAddress()[0]`.

  Returns:
    the raw IP address of this object.
  Throws:
    `UnknownHostException` - if IP address of host could not be determined.

### getHostAddress

    public String getHostAddress()
                          throws UnknownHostException

  Description copied from interface: `Connection`
  Returns the IP address string in textual presentation.

  Returns:
    the raw IP address in a string format.
  Throws:
    `UnknownHostException` - if IP address of host could not be determined.

### getHostName

    public String getHostName()
                       throws UnknownHostException

  Description copied from interface: `Connection`
  Gets the host name for this IP address.

  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.

  Returns:
    the host name for this IP address, or if the operation is not allowed by the security check, the textual representation of the IP address.
  Throws:
    `UnknownHostException` - if IP address of host could not be determined.
  See Also:
    `InetAddress.getCanonicalHostName()`, `SecurityManager.checkConnect(java.lang.String, int)`

### systemShutdown

    public void systemShutdown()

  Description copied from interface: `Connection`
  Notification message indicating that the server is being shutdown. Implementors should send a stream error whose condition is system-shutdown before closing the connection.

### deliver

    public void deliver(org.xmpp.packet.Packet packet)
                 throws UnauthorizedException

  Description copied from interface: `Connection`
  Delivers the packet to this connection without checking the recipient. The method essentially calls `socket.send(packet.getWriteBuffer())`.

  Parameters:
    `packet` - the packet to deliver.
  Throws:
    `UnauthorizedException` - if a permission error was detected.

### deliverRawText

    public void deliverRawText(String text)

  Description copied from interface: `Connection`
  Delivers raw text to this connection. This is a very low level way for sending XML stanzas to the client. This method should not be used unless you have very good reasons for not using `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.

  Parameters:
    `text` - the XML stanzas represented kept in a String.

### getPeerCertificates

    public Certificate[] getPeerCertificates()

  Description copied from interface: `Connection`
  Returns the underlying `X509Certificate` for the connection of the peer.

  Specified by:
    `getPeerCertificates` in interface `Connection`
  Overrides:
    `getPeerCertificates` in class `VirtualConnection`
  Returns:
    an ordered array of peer certificates, with the peer's own certificate first followed by any certificate authorities.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.