|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wimpi.telnetd.net.ConnectionManager
public class ConnectionManager
Class that takes care for active and queued connection. Housekeeping is done also for connections that were just broken off, or exceeded their timeout.
| Constructor Summary | |
|---|---|
ConnectionManager()
|
|
ConnectionManager(int con,
int timew,
int timedis,
int hoke,
ConnectionFilter filter,
java.lang.String lsh,
boolean lm)
|
|
| Method Summary | |
|---|---|
static ConnectionManager |
createConnectionManager(java.lang.String name,
java.util.Properties settings)
Factory method for the ConnectionManager. A class operation that will return a new ConnectionManager instance. |
Connection |
getConnection(int idx)
Returns the Connection at the given index. |
ConnectionFilter |
getConnectionFilter()
Gets the active ConnectionFilter instance or returns null if no filter is set. |
Connection[] |
getConnectionsByAdddress(java.net.InetAddress addr)
Get all Connection instances with the given
InetAddress. |
int |
getDisconnectTimeout()
|
int |
getHousekeepingInterval()
|
java.lang.String |
getLoginShell()
|
int |
getMaxConnections()
|
int |
getWarningTimeout()
|
boolean |
isLineMode()
|
void |
makeConnection(java.net.Socket insock)
Method that that tries to connect an incoming request. |
int |
openConnectionCount()
Returns the number of open connections. |
void |
registerClosedConnection(Connection con)
Called by connections that got broken (i.e. |
void |
run()
Periodically does following work: cleaning up died connections. |
void |
setConnectionFilter(ConnectionFilter filter)
Set a connection filter for this ConnectionManager instance. |
void |
setDisconnectTimeout(int disconnectTimeout)
|
void |
setHousekeepingInterval(int housekeepingInterval)
|
void |
setLineMode(boolean lineMode)
|
void |
setLoginShell(java.lang.String loginShell)
|
void |
setMaxConnections(int maxConnections)
|
void |
setWarningTimeout(int warningTimeout)
|
void |
start()
Starts this ConnectionManager. |
void |
stop()
Stops this ConnectionManager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionManager()
public ConnectionManager(int con,
int timew,
int timedis,
int hoke,
ConnectionFilter filter,
java.lang.String lsh,
boolean lm)
| Method Detail |
|---|
public void setConnectionFilter(ConnectionFilter filter)
filter - ConnectionFilter instance.public ConnectionFilter getConnectionFilter()
public int openConnectionCount()
public Connection getConnection(int idx)
Connection at the given index.
idx -
public Connection[] getConnectionsByAdddress(java.net.InetAddress addr)
Connection instances with the given
InetAddress.
Connection instances with the given
InetAddress.public void start()
public void stop()
public void makeConnection(java.net.Socket insock)
insock - Socket thats representing the incoming connection.public void run()
run in interface java.lang.Runnablepublic void registerClosedConnection(Connection con)
con - the connection that is broken.
public void registerBrokenConnection(Connection con) {
if (!m_BrokenConnections.contains(con) && !m_ClosedConnections.contains(con)) {
log.debug("registerBrokenConnection()::" + con.toString());
m_BrokenConnections.push(con);
}
}//registerBrokenConnection
public static ConnectionManager createConnectionManager(java.lang.String name,
java.util.Properties settings)
throws BootException
settings - Properties containing the settings for this instance.
BootExceptionpublic int getDisconnectTimeout()
public void setDisconnectTimeout(int disconnectTimeout)
public int getHousekeepingInterval()
public void setHousekeepingInterval(int housekeepingInterval)
public boolean isLineMode()
public void setLineMode(boolean lineMode)
public java.lang.String getLoginShell()
public void setLoginShell(java.lang.String loginShell)
public int getMaxConnections()
public void setMaxConnections(int maxConnections)
public int getWarningTimeout()
public void setWarningTimeout(int warningTimeout)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||