Provides implementations of the {@link net.jini.jeri.Endpoint} and {@link net.jini.jeri.ServerEndpoint} abstractions that use HTTP messages sent over TCP sockets as the underlying communication mechanism. {@link net.jini.jeri.http.HttpEndpoint} instances can be used by clients to initiate calls over HTTP; each instance contains the host name and TCP port number to which to connect, as well as an optional {@link javax.net.SocketFactory} for customizing the type of {@link java.net.Socket} to use. {@link net.jini.jeri.http.HttpServerEndpoint} instances are used to listen for and receive incoming calls over HTTP; each instance contains the name of the listening host and the number of the TCP port on which to listen, as well as an optional {@link javax.net.ServerSocketFactory} for customizing the type of {@link java.net.ServerSocket} to use.

Note that providing socket factories which produce SSL sockets does not result in endpoints which are fully HTTPS capable. HTTPS support is offered by the {@link net.jini.jeri.ssl} security provider.

HTTP mapping

HttpEndpoint and HttpServerEndpoint map {@link net.jini.jeri.OutboundRequest} and {@link net.jini.jeri.InboundRequest} instances to HTTP request/response messages: request data is transmitted as the entity-body of an HTTP POST request, while response data is transmitted as the entity-body of the corresponding HTTP response message. When possible, HTTP 1.1 persistent connections and chunked transfer coding are employed. For information on HTTP, refer to RFC 2616.

HTTP proxying

To determine whether or not requests should be sent through an HTTP proxy, HttpEndpoint consults the same set of system properties used by {@link java.net.HttpURLConnection}: The values of the system properties above are resampled for each new outbound HTTP message.

HTTP authentication

HttpEndpoint supports both basic and digest HTTP authentication methods, specified in RFC 2617. Like HttpURLConnection, it obtains authentication parameters (e.g., username, password) from the {@link java.net.Authenticator} class.

Constraint support

HttpEndpoint and HttpServerEndpoint support the transport layer aspects of at least the following constraints: (Note that ClientMaxPrincipal, ClientMaxPrincipalType, ClientMinPrincipal, ClientMinPrincipalType, ServerMinPrincipal, DelegationAbsoluteTime, and DelegationRelativeTime constraints are trivially supported if ClientAuthentication.YES, ServerAuthentication.YES, and Delegation.YES are not supported.) @since 2.0 @version 2.0 @com.sun.jini.impl

Logging

This implementation uses the {@link java.util.logging.Logger} named net.jini.jeri.http.client to log information at the following levels:

Level Description
{@link com.sun.jini.logging.Levels#FAILED FAILED} exceptions thrown attempting to initiate a request
{@link com.sun.jini.logging.Levels#HANDLED HANDLED} exceptions caught attempting to connect a socket, set options on a client-side socket, or reuse a connection
{@link java.util.logging.Level#FINE FINE} client-side socket operations (create, connect, reuse, and close)

This implementation uses the {@link java.util.logging.Logger} named net.jini.jeri.http.server to log information at the following levels:

Level Description
{@link java.util.logging.Level#WARNING WARNING} exceptions accepting on a server socket
{@link com.sun.jini.logging.Levels#HANDLED HANDLED} exceptions caught setting options on a server-side socket
{@link java.util.logging.Level#FINE FINE} server-side socket operations (create, accept, and close)

System properties

In addition to the HTTP proxy-related system properties listed above, this implementation of HttpEndpoint and HttpServerEndpoint recognizes the following system properties: