TcpServerEndpoint
instances contain a host name and a TCP port number, as well as an optional {@link ServerSocketFactory} for customizing the type ofServerSocket
to use and an optional {@link SocketFactory} for customizing the type of {@link Socket} thatclient endpoints will use. The port number is the local TCP port to bind to when listening for incoming socket connections. If the port number is zero, then each listen operation will bind to a free (non-zero) port, which will be the port number contained in the resulting {@link TcpEndpoint}. The host name contained in a TcpServerEndpoint
controls the host name that will be contained in the TcpEndpoint
instances produced when {@link #enumerateListenEndpoints enumerateListenEndpoints} isinvoked to listen on the TcpServerEndpoint
(this host name does not affect the behavior of listen operations themselves). If the host name in a TcpServerEndpoint
is null
, then the host name in the TcpEndpoint
instances that it produces will be the IP address string obtained from {@link InetAddress#getLocalHost InetAddress.getLocalHost} when {@link #enumerateListenEndpoints enumerateListenEndpoints} is invoked.
TcpServerEndpoint
uses the Jini extensible remote invocation (Jini ERI) multiplexing protocol to map incoming requests to socket connections.
A ServerSocketFactory
used with a TcpServerEndpoint
must implement {@link Object#equals Object.equals} to obey the guidelines that are specified forequals
methods of {@link net.jini.jeri.ServerEndpoint.ListenEndpoint ListenEndpoint}instances. A SocketFactory
used with a TcpServerEndpoint
should be serializable and must implement Object.equals
to obey the guidelines that are specified for equals
methods of {@link Endpoint}instances.
@author Sun Microsystems, Inc.
@see TcpEndpoint
@since 2.0
|
|
|
|
|
|