Endpoint
and
ServerEndpoint
abstractions that use TCP sockets
as the underlying communication mechanism.See: Description
Class | Description |
---|---|
TcpEndpoint | |
TcpServerEndpoint |
An implementation of the
ServerEndpoint abstraction that
uses TCP sockets (instances of ServerSocket ) for the
underlying communication mechanism. |
Endpoint
and
ServerEndpoint
abstractions that use TCP sockets
as the underlying communication mechanism.
Requests and responses are framed and multiplexed over TCP connections
using the Jini
extensible remote invocation (Jini ERI) multiplexing protocol.
A TcpEndpoint
can be used to initiate
requests over a TCP connection. Each instance contains a host name
string (which may be a name or an IP address) and a TCP port number,
as well as an optional SocketFactory
for customizing
the type of Socket
instances to use. When initiating
a new request, a new TCP connection is created to the host and port,
using the socket factory if present, if an existing connection is not
already available for use.
A TcpServerEndpoint
can be used to listen
for and receive incoming requests over a TCP connection. Each
instance contains a TCP port number to listen on, a host name string
to use in Endpoint
instances derived from the instance,
an optional ServerSocketFactory
for customizing the
type of ServerSocket
instances to use, and an
optional SocketFactory
to use in derived
Endpoint
instances. When listening for requests, the
port is bound to listen for TCP connections, using the server socket
factory if present. The TcpServerEndpoint.enumerateListenEndpoints
method will produce
TcpEndpoint
instances with the same host name, port, and
client socket factory for client-side use (for example, to be embedded
in remote proxies).
TcpEndpoint
and TcpServerEndpoint
map,
respectively, OutboundRequest
and InboundRequest
instances to distinct sessions of a Jini
ERI multiplexing protocol connection. For each new request initiated,
a TcpEndpoint
starts a new session as the client of a
connection to the remote endpoint. As the server of an accepted
connection, a TcpServerEndpoint
creates a new
InboundRequest
to represent each session started by the
remote endpoint. Request data is transmitted as the data sent for the
corresponding session by the client, and response data is transmitted
as the data sent for the corresponding session by the server. TCP
connections are reused by a TcpEndpoint
when possible.
TcpEndpoint
and TcpServerEndpoint
support
the transport layer aspects of at least the following constraints:
ConnectionAbsoluteTime
ConnectionRelativeTime
ConstraintAlternatives
if at
least one element is supported
Integrity.NO
Confidentiality.NO
ClientAuthentication.NO
ServerAuthentication.NO
Delegation.NO
ClientMaxPrincipal
ClientMaxPrincipalType
ClientMinPrincipal
ClientMinPrincipalType
ServerMinPrincipal
DelegationAbsoluteTime
DelegationRelativeTime
ClientMaxPrincipal
,
ClientMaxPrincipalType
, ClientMinPrincipal
,
ClientMinPrincipalType
, ServerMinPrincipal
,
DelegationAbsoluteTime
, and
DelegationRelativeTime
constraints are trivially
supported if ClientAuthentication.YES
,
ServerAuthentication.YES
, and Delegation.YES
are not supported.)ConnectionManager
and ServerConnectionManager
for connection
management.
Logger
named
net.jini.jeri.tcp.client
to log information at the
following levels:
Level | Description |
---|---|
FAILED
| exceptions thrown attempting to initiate a request |
HANDLED
| exceptions caught attempting to connect a socket, set options on a client-side socket, or reuse a connection |
FINE
| client-side socket operations (create, connect, reuse, and close) |
This implementation uses the Logger
named
net.jini.jeri.tcp.server
to log information at the
following levels:
Level | Description |
---|---|
WARNING
| exceptions accepting on a server socket |
HANDLED
| exceptions caught setting options on a server-side socket |
FINE
| server-side socket operations (create, accept, and close) |
org.apache.river.jeri.tcp.useNIO
- This property is
interpreted as a boolean
value (see Boolean.getBoolean
). If
true
, then when not using a socket factory, the
implementation will use java.nio.channels
APIs to create
sockets that have associated selectable channels; specifically:
TcpEndpoint
with no socket factory will create
sockets using SocketChannel.open
, and
TcpServerEndpoint
with no server socket factory
will create server sockets using ServerSocketChannel.open
.
TcpEndpoint
with no socket factory will create
sockets using Socket.Socket()
, and
TcpServerEndpoint
with no server socket factory
will create server sockets using ServerSocket.ServerSocket(int)
.
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.