Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.nntp.spi
Class NNTPConnectionManager

java.lang.Object
  extended by com.jivesoftware.forum.net.spi.AbstractConnectionManager
      extended by com.jivesoftware.forum.nntp.spi.NNTPConnectionManager
All Implemented Interfaces:
JiveManager, ConnectionManager

public class NNTPConnectionManager
extends AbstractConnectionManager

A connection manager for NNTP servers. The class is primarily responsible for specifying the correct connection worker factory for the AbstractConnectionManager to use. The NNTPConnectionManager is also critical in mapping connections to sessions as soon as they are added to this connection manager.


Constructor Summary
NNTPConnectionManager(SessionManager sessionManager)
          Create a connection manager a session manager.
 
Method Summary
 void addConnection(Connection con)
          Add a connection to the manager.
 void removeConnection(Connection conn)
          Remove the given connection from the manager.
 
Methods inherited from class com.jivesoftware.forum.net.spi.AbstractConnectionManager
createConnection, destroy, getConfigMonitor, getConnectedMonitor, getConnection, getConnectionCount, getConnections, getConnections, getDisconnectedMonitor, getMaxConnections, initialize, registerCloseListener, removeCloseListener, setMaxConnections, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NNTPConnectionManager

public NNTPConnectionManager(SessionManager sessionManager)
Create a connection manager a session manager.

Parameters:
sessionManager - the session manager this connection manager will use.
Method Detail

addConnection

public void addConnection(Connection con)
Description copied from interface: ConnectionManager

Add a connection to the manager.

Connections added to the ConnectionManager are monitored for closing and are automatically added to the idle group by calling Connection.idle() on the added connection. Connections should use the idle() method to add themself to the idle group using addIdleSocket().

Connections should hide their underlying socket implementation. However, in order for the ConnectionManager to properly detect new data for reading on it's connections, it must have the socket of the connection. This is especially important when using nio channels.

Specified by:
addConnection in interface ConnectionManager
Overrides:
addConnection in class AbstractConnectionManager
Parameters:
con - the connection to add to this manager for active management

removeConnection

public void removeConnection(Connection conn)
                      throws java.lang.IllegalStateException
Description copied from interface: ConnectionManager
Remove the given connection from the manager.

Specified by:
removeConnection in interface ConnectionManager
Overrides:
removeConnection in class AbstractConnectionManager
Parameters:
conn - the connection to remove from the manager.
Throws:
java.lang.IllegalStateException

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.