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

## org.jivesoftware.openfire.nio
Class ConnectionHandler

    java.lang.Object
      org.apache.mina.common.IoHandlerAdapter
          org.jivesoftware.openfire.nio.ConnectionHandler

All Implemented Interfaces:
  org.apache.mina.common.IoHandler

Direct Known Subclasses:
  ClientConnectionHandler, ComponentConnectionHandler, MultiplexerConnectionHandler

    public abstract class ConnectionHandler

extends org.apache.mina.common.IoHandlerAdapter

A ConnectionHandler is responsible for creating new sessions, destroying sessions and delivering received XML stanzas to the proper StanzaHandler.

Author:
  Gaston Dombiak

Field Summary
`protected static String` | `CONNECTION`
`protected static String` | `HANDLER`
`protected String` | `serverName`

Constructor Summary
`protected` | `ConnectionHandler(String serverName)`

Method Summary
`void` | `exceptionCaught(org.apache.mina.common.IoSession session, Throwable cause)`
`void` | `messageReceived(org.apache.mina.common.IoSession session, Object message)`
`void` | `messageSent(org.apache.mina.common.IoSession session, Object message)`
`void` | `sessionClosed(org.apache.mina.common.IoSession session)`
`void` | `sessionIdle(org.apache.mina.common.IoSession session, org.apache.mina.common.IdleStatus status)` Invoked when a MINA session has been idle for half of the allowed XMPP session idle time as specified by `getMaxIdleTime()`.
`void` | `sessionOpened(org.apache.mina.common.IoSession session)`

Methods inherited from class org.apache.mina.common.IoHandlerAdapter
`sessionCreated`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HANDLER

    protected static final String HANDLER

See Also:
  Constant Field Values

### CONNECTION

    protected static final String CONNECTION

See Also:
  Constant Field Values

### serverName

    protected String serverName

Constructor Detail

### ConnectionHandler

    protected ConnectionHandler(String serverName)

Method Detail

### sessionOpened

    public void sessionOpened(org.apache.mina.common.IoSession session)
                       throws Exception

  Specified by:
    `sessionOpened` in interface `org.apache.mina.common.IoHandler`
  Overrides:
    `sessionOpened` in class `org.apache.mina.common.IoHandlerAdapter`
  Throws:
    `Exception`

### sessionClosed

    public void sessionClosed(org.apache.mina.common.IoSession session)
                       throws Exception

  Specified by:
    `sessionClosed` in interface `org.apache.mina.common.IoHandler`
  Overrides:
    `sessionClosed` in class `org.apache.mina.common.IoHandlerAdapter`
  Throws:
    `Exception`

### sessionIdle

    public void sessionIdle(org.apache.mina.common.IoSession session,
                            org.apache.mina.common.IdleStatus status)
                     throws Exception

  Invoked when a MINA session has been idle for half of the allowed XMPP session idle time as specified by `getMaxIdleTime()`. This method will be invoked each time that such a period passes (even if no IO has occurred in between). Openfire will disconnect a session the second time this method is invoked, if no IO has occurred between the first and second invocation. This allows extensions of this class to use the first invocation to check for livelyness of the MINA session (e.g by polling the remote entity, as `ClientConnectionHandler` does).

  Specified by:
    `sessionIdle` in interface `org.apache.mina.common.IoHandler`
  Overrides:
    `sessionIdle` in class `org.apache.mina.common.IoHandlerAdapter`
  Throws:
    `Exception`
  See Also:
    `IoHandlerAdapter.sessionIdle(org.apache.mina.common.IoSession, org.apache.mina.common.IdleStatus)`

### exceptionCaught

    public void exceptionCaught(org.apache.mina.common.IoSession session,
                                Throwable cause)
                         throws Exception

  Specified by:
    `exceptionCaught` in interface `org.apache.mina.common.IoHandler`
  Overrides:
    `exceptionCaught` in class `org.apache.mina.common.IoHandlerAdapter`
  Throws:
    `Exception`

### messageReceived

    public void messageReceived(org.apache.mina.common.IoSession session,
                                Object message)
                         throws Exception

  Specified by:
    `messageReceived` in interface `org.apache.mina.common.IoHandler`
  Overrides:
    `messageReceived` in class `org.apache.mina.common.IoHandlerAdapter`
  Throws:
    `Exception`

### messageSent

    public void messageSent(org.apache.mina.common.IoSession session,
                            Object message)
                     throws Exception

  Specified by:
    `messageSent` in interface `org.apache.mina.common.IoHandler`
  Overrides:
    `messageSent` in class `org.apache.mina.common.IoHandlerAdapter`
  Throws:
    `Exception`

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

Copyright © 2003-2008 Jive Software.