|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectctf.evaluation.simulator.ConnectionManager
public class ConnectionManager
Manages connections for tests. Since connections may be persistent, we need this singleton to ensure that they're open, in the correct STEAL state, etc.
Nested Class Summary | |
---|---|
static class |
ConnectionManager.STEALState
States the STEAL protocol can be in |
Constructor Summary | |
---|---|
protected |
ConnectionManager()
Singleton constructor. |
Method Summary | |
---|---|
Connection |
blue()
Blue team |
protected void |
closeConnections()
Close open connections |
void |
enterState(ConnectionManager.STEALState state)
Get the controllers into a particular STEAL state. |
static ConnectionManager |
instance()
Singleton access |
protected void |
openConnections()
Open controller connections |
Connection |
red()
Red team |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ConnectionManager()
Method Detail |
---|
public static ConnectionManager instance()
public void enterState(ConnectionManager.STEALState state) throws java.io.IOException, NetworkException, ProtocolError
state
- the state to get into
java.io.IOException
NetworkException
ProtocolError
public Connection red() throws NetworkException
NetworkException
public Connection blue() throws NetworkException
NetworkException
protected void openConnections() throws NetworkException
NetworkException
protected void closeConnections() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |