Class ListenerMetaData


  • public class ListenerMetaData
    extends ConnectionMetaData
    A ListenerMetaData object describes a TCP listener.
    Author:
    IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
    • Constructor Detail

      • ListenerMetaData

        public ListenerMetaData​(java.net.InetAddress bindAddress,
                                int port,
                                Swiftlet swiftlet,
                                long keepAliveInterval,
                                java.lang.String socketFactoryClass,
                                ConnectionListener connectionListener,
                                int inputBufferSize,
                                int inputExtendSize,
                                int outputBufferSize,
                                int outputExtendSize)
        Constructs a new ListenerMetaData.
        Parameters:
        bindAddress - IP bind address
        port - port.
        swiftlet - Swiftlet.
        keepAliveInterval - keep alive interval.
        socketFactoryClass - name of the socket factory class.
        connectionListener - connection listener.
        inputBufferSize - input network buffer size
        inputExtendSize - input network extend size
        outputBufferSize - output network buffer size
        outputExtendSize - output network extend size
      • ListenerMetaData

        public ListenerMetaData​(java.net.InetAddress bindAddress,
                                int port,
                                Swiftlet swiftlet,
                                long keepAliveInterval,
                                java.lang.String socketFactoryClass,
                                ConnectionListener connectionListener,
                                int inputBufferSize,
                                int inputExtendSize,
                                int outputBufferSize,
                                int outputExtendSize,
                                boolean useTcpNoDelay)
        Constructs a new ListenerMetaData.
        Parameters:
        bindAddress - IP bind address
        port - port.
        swiftlet - Swiftlet.
        keepAliveInterval - keep alive interval.
        socketFactoryClass - name of the socket factory class.
        connectionListener - connection listener.
        inputBufferSize - input network buffer size
        inputExtendSize - input network extend size
        outputBufferSize - output network buffer size
        outputExtendSize - output network extend size
        useTcpNoDelay - use TCP No Delay
      • ListenerMetaData

        public ListenerMetaData​(java.net.InetAddress bindAddress,
                                int port,
                                Swiftlet swiftlet,
                                long keepAliveInterval,
                                java.lang.String socketFactoryClass,
                                ConnectionListener connectionListener,
                                int inputBufferSize,
                                int inputExtendSize,
                                int outputBufferSize,
                                int outputExtendSize,
                                ProtocolInputHandler protocolInputHandler,
                                ProtocolOutputHandler protocolOutputHandler)
        Constructs a new ListenerMetaData.
        Parameters:
        bindAddress - IP bind address
        port - port.
        swiftlet - Swiftlet.
        keepAliveInterval - keep alive interval.
        socketFactoryClass - name of the socket factory class.
        connectionListener - connection listener.
        inputBufferSize - input network buffer size
        inputExtendSize - input network extend size
        outputBufferSize - output network buffer size
        outputExtendSize - output network extend size
        protocolInputHandler - protocol input handler.
        protocolOutputHandler - protocol output handler.
      • ListenerMetaData

        public ListenerMetaData​(java.net.InetAddress bindAddress,
                                int port,
                                Swiftlet swiftlet,
                                long keepAliveInterval,
                                java.lang.String socketFactoryClass,
                                ConnectionListener connectionListener,
                                int inputBufferSize,
                                int inputExtendSize,
                                int outputBufferSize,
                                int outputExtendSize,
                                boolean useTcpNoDelay,
                                ProtocolInputHandler protocolInputHandler,
                                ProtocolOutputHandler protocolOutputHandler)
        Constructs a new ListenerMetaData.
        Parameters:
        bindAddress - IP bind address
        port - port.
        swiftlet - Swiftlet.
        keepAliveInterval - keep alive interval.
        socketFactoryClass - name of the socket factory class.
        connectionListener - connection listener.
        inputBufferSize - input network buffer size
        inputExtendSize - input network extend size
        outputBufferSize - output network buffer size
        outputExtendSize - output network extend size
        useTcpNoDelay - use TCP No Delay
        protocolInputHandler - protocol input handler.
        protocolOutputHandler - protocol output handler.
    • Method Detail

      • getBindAddress

        public java.net.InetAddress getBindAddress()
        Returns the bind address.
        Returns:
        bind address.
      • getPort

        public int getPort()
        Returns the port.
        Returns:
        bind port.
      • addToHostAccessList

        public void addToHostAccessList​(java.lang.String predicate)
        Adds a new predicate to the host access list. The predicate is a SQL Like predicate which is compared against the remote host name on connect. Only those hosts which matches at least one predicate are allowed to connect, otherwise the connection will be rejected.
        Parameters:
        predicate - SQL Like predicate.
      • removeFromHostAccessList

        public void removeFromHostAccessList​(java.lang.String predicate)
        Removes a predicate from the host access list.
        Parameters:
        predicate - SQL Like predicate.
      • isConnectionAllowed

        public boolean isConnectionAllowed​(java.lang.String hostname)
        Returns if the given hostname is allowed to connect. This method compares the hostname against the host access list. Internal use only.
        Parameters:
        hostname - name of the remote host.
        Returns:
        true/false.