|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.net.AcceptManager
public class AcceptManager
Manages the server sockets that accept incoming connections.
The AcceptManager is responsible for managing AcceptPorts, enforcing any AcceptPolicies that are in place, and passing accepted connections to the ConnectionManager for management.
Constructor Summary | |
---|---|
AcceptManager(ConnectionManager connMan,
java.lang.String portNamePrefix)
Create the accept manager with the given connection manager to receive incoming connections. |
Method Summary | |
---|---|
AcceptPort |
createAcceptPort(java.net.InetAddress portAddress,
int portNumber)
Creates a new accept port that will be bound to the given port address. |
void |
deleteAcceptPort(AcceptPort acceptPort)
Removes the given accept port relying on the underlying port to properly clean up it's own resources, running threads, and delete any relevant configuration properties. |
void |
destroy()
Notifies the manager to release any resources that may be holding on too. |
AcceptPort |
getAcceptPort(java.net.InetAddress portAddress,
int portNumber)
Obtains an accept port by address and port. |
int |
getAcceptPortCount()
Returns the number of accept ports being managed. |
java.util.Iterator |
getAcceptPorts()
Obtain an iterator over all the AcceptPorts being managed. |
java.util.Iterator |
getAcceptPorts(BasicResultFilter filter)
Obtain an iterator over the AcceptPorts being managed that comply with the given result filter. |
AcceptPolicy |
getGlobalAcceptPolicy()
Returns the accept policy. |
void |
initialize()
Initialize the manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AcceptManager(ConnectionManager connMan, java.lang.String portNamePrefix)
Create the accept manager with the given connection manager to receive incoming connections.
connMan
- the connection manager the accept manager will
use for incoming connections.portNamePrefix
- the prefix for the configuration name root describing
ports to manage by this accept managerMethod Detail |
---|
public void initialize()
JiveManager
This method is used internally by Jive during application startup and should not be called during normal usage of the class.
initialize
in interface JiveManager
public void destroy()
JiveManager
destroy
in interface JiveManager
public AcceptPolicy getGlobalAcceptPolicy()
public int getAcceptPortCount()
public java.util.Iterator getAcceptPorts()
Obtain an iterator over all the AcceptPorts being managed.
public java.util.Iterator getAcceptPorts(BasicResultFilter filter)
Obtain an iterator over the AcceptPorts being managed that comply with the given result filter.
filter
- the filter to apply to the port list results.
public AcceptPort getAcceptPort(java.net.InetAddress portAddress, int portNumber) throws NotFoundException
Obtains an accept port by address and port.
If the portAddress is null, and there is more than one accept port bound to the same port (e.g. multi-homed hosts with different accept ports on each interface), one of the matching ports is returned. There is no guarantee which will be returned, or if the same or different ports will be returned on subsequent calls. If it is important to obtain all accept ports bound to a particular port, on any interface, it is better to search the list of accept ports using the getAcceptPorts() method.
portAddress
- the address of the accept port to remove or null
for any/all addresses.portNumber
- the number of the port to remove or null for any/all.
NotFoundException
- if no matching accept port was found.public AcceptPort createAcceptPort(java.net.InetAddress portAddress, int portNumber) throws AlreadyExistsException
Creates a new accept port that will be bound to the given port address.
Port creation uses JiveGlobals.setJiveProperty() to set up the port under a root "portx" name where 'x' is some number to differentiate ports from each other. This is a workaround to make the property naming model fit with XML trees where several parallel settings must exist.
Creation of the accept port does not bind the port or open it for accepting new connections. Adjust the resulting AcceptPort instance in order to configure it's initial setup.
portAddress
- the address to set the accept port on or null
to accept connections on any/all local addresses..portNumber
- the port number of the accept port to create.
AlreadyExistsException
- if an accept port already exists on
the given address and port.public void deleteAcceptPort(AcceptPort acceptPort)
Removes the given accept port relying on the underlying port to properly clean up it's own resources, running threads, and delete any relevant configuration properties.
acceptPort
- the accept port to remove.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |