Runnable
public abstract class ConnectionManager extends Object implements Runnable
Constructor | Description |
---|---|
ConnectionManager() |
|
ConnectionManager(int con,
int timew,
int timedis,
int hoke,
ConnectionFilter filter,
String lsh,
boolean lm) |
Modifier and Type | Method | Description |
---|---|---|
protected abstract Connection |
createConnection(ThreadGroup threadGroup,
ConnectionData newCD) |
|
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(InetAddress addr) |
Get all
Connection instances with the given
InetAddress. |
int |
getDisconnectTimeout() |
|
int |
getHousekeepingInterval() |
|
String |
getLoginShell() |
|
int |
getMaxConnections() |
|
int |
getWarningTimeout() |
|
boolean |
isLineMode() |
|
void |
makeConnection(Socket insock) |
Method that that tries to connect an incoming request.
|
int |
openConnectionCount() |
Returns the number of open connections.
|
void |
registerClosedConnection(Connection con) |
|
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(String loginShell) |
|
void |
setMaxConnections(int maxConnections) |
|
void |
setWarningTimeout(int warningTimeout) |
|
void |
start() |
Starts this ConnectionManager.
|
void |
stop() |
Stops this ConnectionManager.
|
public ConnectionManager()
public ConnectionManager(int con, int timew, int timedis, int hoke, ConnectionFilter filter, String lsh, boolean lm)
public ConnectionFilter getConnectionFilter()
public void setConnectionFilter(ConnectionFilter filter)
filter
- ConnectionFilter instance.public int openConnectionCount()
public Connection getConnection(int idx)
Connection
at the given index.idx
- the indexpublic Connection[] getConnectionsByAdddress(InetAddress addr)
Connection
instances with the given
InetAddress.addr
- the addressConnection
instances with the given
InetAddress.public void start()
public void stop()
public void makeConnection(Socket insock)
insock
- Socket thats representing the incoming connection.protected abstract Connection createConnection(ThreadGroup threadGroup, ConnectionData newCD)
public void run()
public void registerClosedConnection(Connection con)
public int getDisconnectTimeout()
public void setDisconnectTimeout(int disconnectTimeout)
public int getHousekeepingInterval()
public void setHousekeepingInterval(int housekeepingInterval)
public boolean isLineMode()
public void setLineMode(boolean lineMode)
public String getLoginShell()
public void setLoginShell(String loginShell)
public int getMaxConnections()
public void setMaxConnections(int maxConnections)
public int getWarningTimeout()
public void setWarningTimeout(int warningTimeout)
Copyright © 2020. All rights reserved.