Class TCPServerSOContainer

    • Field Detail

      • DEFAULT_PROTOCOL

        public static final java.lang.String DEFAULT_PROTOCOL
        See Also:
        Constant Field Values
      • DEFAULT_PORT

        public static final int DEFAULT_PORT
      • DEFAULT_KEEPALIVE

        public static final int DEFAULT_KEEPALIVE
      • DEFAULT_NAME

        public static final java.lang.String DEFAULT_NAME
      • DEFAULT_HOST

        public static java.lang.String DEFAULT_HOST
      • DEFAULT_FALLBACK_PORT

        public static final boolean DEFAULT_FALLBACK_PORT
        Since:
        4.2
      • keepAlive

        protected int keepAlive
      • isSingle

        protected boolean isSingle
    • Constructor Detail

      • TCPServerSOContainer

        public TCPServerSOContainer​(ISharedObjectContainerConfig config,
                                    int port,
                                    java.net.InetAddress bindAddress,
                                    java.lang.String path,
                                    int keepAlive)
                             throws java.io.IOException
        Parameters:
        config - config
        port - port
        bindAddress - bind address
        path - path
        keepAlive - keep alive
        Throws:
        java.io.IOException - if some problem creating
        Since:
        4.4
      • TCPServerSOContainer

        public TCPServerSOContainer​(ISharedObjectContainerConfig config,
                                    java.net.InetAddress bindAddress,
                                    int keepAlive)
                             throws java.io.IOException,
                                    java.net.URISyntaxException
        Parameters:
        config - config
        bindAddress - bind address
        keepAlive - keep alive
        Throws:
        java.io.IOException - if some problem creating
        java.net.URISyntaxException - if some problem creating
        Since:
        4.4
      • TCPServerSOContainer

        public TCPServerSOContainer​(ISharedObjectContainerConfig config)
                             throws java.io.IOException,
                                    java.net.URISyntaxException
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • TCPServerSOContainer

        public TCPServerSOContainer​(ISharedObjectContainerConfig config,
                                    int keepAlive)
                             throws java.io.IOException,
                                    java.net.URISyntaxException
        Throws:
        java.io.IOException
        java.net.URISyntaxException
    • Method Detail

      • getKeepAlive

        protected int getKeepAlive()
      • getServerURL

        public static java.lang.String getServerURL​(java.lang.String host,
                                                    java.lang.String name)
      • getDefaultServerURL

        public static java.lang.String getDefaultServerURL()
      • dispose

        public void dispose()
        Description copied from interface: IContainer
        Dispose this IContainer instance. The container instance will be made inactive after the completion of this method and will be unavailable for subsequent usage.
        Specified by:
        dispose in interface IContainer
        Overrides:
        dispose in class ServerSOContainer
      • handleConnectRequest

        public java.io.Serializable handleConnectRequest​(java.net.Socket socket,
                                                         java.lang.String target,
                                                         java.io.Serializable data,
                                                         ISynchAsynchConnection conn)
        Description copied from interface: IConnectRequestHandler
        Handle a connect request from remote client
        Specified by:
        handleConnectRequest in interface IConnectRequestHandler
        Parameters:
        socket - the Socket that the request came in on
        target - the target that the request is intended for
        data - any data that was sent along with request (e.g. password or other authentication data)
        conn - the connection instance that received the request
        Returns:
        any data intended as a response. If null is returned, this typically means refusal of connect request
      • getConnectDataFromInput

        protected java.io.Serializable getConnectDataFromInput​(java.io.Serializable input)
                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception