Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.nntp
Class NNTPServer

java.lang.Object
  extended by com.jivesoftware.forum.nntp.NNTPServer
All Implemented Interfaces:
JiveManager

public class NNTPServer
extends java.lang.Object
implements JiveManager

Factory class to simplify access to NNTP system.


Method Summary
 void destroy()
          Notifies the manager to release any resources that may be holding on too.
 AcceptManager getAcceptManager()
          Obtain the server's accept manager.
 ConnectionManager getConnectionManager()
          Obtain the server's connection manager.
static NNTPServer getInstance()
          Returns a NNTPServer instance.
 NNTPServerConfig getServerConfig()
          Obtain the article handling configuration for the NNTP server.
 SessionManager getSessionManager()
          Obtain the server's session manager.
 java.util.Date getStartDate()
          Obtain the date the server was started.
 java.util.Date getStopDate()
          Obtain the date the server was last stopped, or null if the server is running.
 void initialize()
          Initialize the manager.
 boolean isRunning()
          Returns true if the server is currently running.
static void main(java.lang.String[] args)
          Starts the server from the command line.
 void restart()
          Restart the NNTP server, if it's currently running.
 void setNNTPEnabled(boolean enabled)
          Enables or disables the NNTP service.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static NNTPServer getInstance()
Returns a NNTPServer instance.

Returns:
the NNTPServer for this JVM.

initialize

public void initialize()
Description copied from interface: JiveManager
Initialize the manager. It is within this method that it is ok to create, access and/or otherwise use external classes (including caches). Until this method is called implementation should not access any external classes that could possibly either access one of the main Factory classes or any caches since doing so can cause deadlocks and possible clustering issues during startup.

This method is used internally by Jive during application startup and should not be called during normal usage of the class.

Specified by:
initialize in interface JiveManager

destroy

public void destroy()
Description copied from interface: JiveManager
Notifies the manager to release any resources that may be holding on too. This could also be used to clear out the managers caches, etc.

This method is used internally by Jive during application startup and should not be called during normal usage of the class.

Specified by:
destroy in interface JiveManager

getServerConfig

public NNTPServerConfig getServerConfig()
Obtain the article handling configuration for the NNTP server.

Returns:
the article handling configuration for the NNTP server.

getStartDate

public java.util.Date getStartDate()
                            throws java.lang.IllegalStateException
Obtain the date the server was started.

Returns:
the date the server was started.
Throws:
java.lang.IllegalStateException - if the module was not initialized.

getStopDate

public java.util.Date getStopDate()
Obtain the date the server was last stopped, or null if the server is running.

Returns:
the date the server was last stoped or null if the server is running.

getSessionManager

public SessionManager getSessionManager()
                                 throws java.lang.IllegalStateException
Obtain the server's session manager.

Returns:
the session manager for the server.
Throws:
java.lang.IllegalStateException - if the module was not started.

getConnectionManager

public ConnectionManager getConnectionManager()
                                       throws java.lang.IllegalStateException
Obtain the server's connection manager.

Returns:
the connection manager for the server.
Throws:
java.lang.IllegalStateException

getAcceptManager

public AcceptManager getAcceptManager()
                               throws java.lang.IllegalStateException
Obtain the server's accept manager.

Returns:
the accept manager for the server.
Throws:
java.lang.IllegalStateException - if the module was not started.

isRunning

public boolean isRunning()
Returns true if the server is currently running. A server is either running (call to start() made but no call to stop()) or it is in a 'not running' state. NOTE: a server can be running but all accept ports may be closed. This essentially means the server is still unreachable by clients even though all other parts of the server are running.

Returns:
true if the server is running

setNNTPEnabled

public void setNNTPEnabled(boolean enabled)
Enables or disables the NNTP service.

Parameters:
enabled - true to enable the NNTP service.

restart

public void restart()
Restart the NNTP server, if it's currently running.


shutdown

public void shutdown()

main

public static void main(java.lang.String[] args)
Starts the server from the command line.

Parameters:
args - the command line arguments

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.