Package com.tailf.ned

Class NedMux

Object
com.tailf.ned.NedMux
All Implemented Interfaces:
Runnable

public class NedMux extends Object implements 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 Details

    • NedMux

      public NedMux()
    • NedMux

      public NedMux(String host, int port)
  • Method Details

    • start

      public void start()
    • stopRequest

      public void stopRequest()
    • getConnection

      public NedConnectionBase getConnection(int id)
    • register

      public void register(NedConnectionBase userMod)
      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

      public boolean reRegister(NedConnectionBase userMod)
      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

      public ConfEList getNewNeds() throws Exception
      Throws:
      Exception
    • resetNewNeds

      public void resetNewNeds()
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getErrorVerbosity

      public ErrorVerbosity 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

      public 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 NedMux
      Parameters:
      verbosity -
    • getErrorMessageFormatter

      public ErrorMessageFormatter getErrorMessageFormatter()
      Return the errorMessageFormatter for this NedMux.
      Returns:
      ErrorMessageFormatter for this NedMux
    • listOpenConnections

      public String[] listOpenConnections()