Module org.snmp4j

Class DefaultTcpTransportMapping

    • Constructor Detail

      • DefaultTcpTransportMapping

        public DefaultTcpTransportMapping()
                                   throws java.io.IOException
        Creates a default TCP transport mapping with the server for incoming messages disabled.
        Throws:
        java.io.IOException - on failure of binding a local port.
      • DefaultTcpTransportMapping

        public DefaultTcpTransportMapping​(TcpAddress serverAddress,
                                          boolean serverEnabled)
                                   throws java.io.IOException
        Creates a default TCP transport mapping that binds to the given address (interface) on the local host and enables server mode on request.
        Parameters:
        serverAddress - the TcpAddress instance that describes the server address to listen on incoming connection requests.
        serverEnabled - if true the server mode is enabled and incoming new connections are accepted. Use false to allow outgoing messages and their responses only (client mode).
        Throws:
        java.io.IOException - if the given address cannot be bound.
      • DefaultTcpTransportMapping

        public DefaultTcpTransportMapping​(TcpAddress serverAddress)
                                   throws java.io.IOException
        Creates a default TCP transport mapping that binds to the given address (interface) on the local host and enables server mode (i.e. accepts incoming new connections).
        Parameters:
        serverAddress - the TcpAddress instance that describes the server address to listen on incoming connection requests.
        Throws:
        java.io.IOException - if the given address cannot be bound.