Package com.tailf.ned
Class NedMux
Object
com.tailf.ned.NedMux
- All Implemented Interfaces:
Runnable
The NedMux is used as the interface between NCS and the NedConnections.
It will receive requests from the NCS, assign them to different
connections and workers, as well as initiating new connections, and
to keep track of the connection pool.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetConnection
(int id) Return the errorMessageFormatter for this NedMux.Get the local verbosity level for reported errors If this verbosity is null the the default level governs the error verbosity of this NedMuxString[]
void
register
(NedConnectionBase userMod) Register a new NedConnection with the mux.boolean
reRegister
(NedConnectionBase userMod) The reRegister method will, NCS unknowingly, exchange the ned implementation on the fly.void
void
run()
void
setErrorVerbosity
(ErrorVerbosity verbosity) set the local verbosity level for reported errors If this verbosity is set to null the the default level governs the error verbosity of this NedMuxvoid
start()
void
-
Constructor Details
-
NedMux
public NedMux() -
NedMux
-
-
Method Details
-
start
public void start() -
stopRequest
public void stopRequest() -
getConnection
-
register
Register a new NedConnection with the mux. It will be reported to NCS when the NedMux connects to NCS and the NCS can request new connections to be established using the NedConnection object.- Parameters:
userMod
-
-
reRegister
The reRegister method will, NCS unknowingly, exchange the ned implementation on the fly. Since no communication with NCS is performed, only exchanged of already registered neds are allowed. The method returns true if an exchange was performed.- Parameters:
userMod
-
-
getNewNeds
- Throws:
Exception
-
resetNewNeds
public void resetNewNeds() -
run
public void run() -
getErrorVerbosity
Get the local verbosity level for reported errors If this verbosity is null the the default level governs the error verbosity of this NedMux- Returns:
- current errorVerbosity
-
setErrorVerbosity
set the local verbosity level for reported errors If this verbosity is set to null the the default level governs the error verbosity of this NedMux- Parameters:
verbosity
-
-
getErrorMessageFormatter
Return the errorMessageFormatter for this NedMux.- Returns:
- ErrorMessageFormatter for this NedMux
-
listOpenConnections
-