Top Description Fields Constructors Methods
org.apache.hc.core5.http.impl.bootstrap

public Class HttpAsyncServer

extends AsyncServer
Class Inheritance
Imports
java.net.InetSocketAddress, .SocketAddress, java.util.concurrent.Future, org.apache.hc.core5.annotation.Internal, org.apache.hc.core5.concurrent.FutureCallback, org.apache.hc.core5.function.Callback, .Decorator, org.apache.hc.core5.http.URIScheme, org.apache.hc.core5.reactor.EndpointParameters, .IOEventHandlerFactory, .IOReactorConfig, .IOSession, .IOSessionListener, .ListenerEndpoint, org.apache.hc.core5.http.nio.command.ShutdownCommand

HTTP/1.1 server side message exchange handler.
Since
5.0

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
HttpAsyncServer(final IOEventHandlerFactory eventHandlerFactory, final IOReactorConfig ioReactorConfig, final Decorator<IOSession> ioSessionDecorator, final Callback<Exception> exceptionCallback, final IOSessionListener sessionListener, final String canonicalName)

Use AsyncServerBootstrap to create instances of this class.

public
HttpAsyncServer(final IOEventHandlerFactory eventHandlerFactory, final IOReactorConfig ioReactorConfig, final Decorator<IOSession> ioSessionDecorator, final Callback<Exception> exceptionCallback, final IOSessionListener sessionListener)

Use AsyncServerBootstrap to create instances of this class.

Method Summary

Modifier and TypeMethod and Description
public Future<ListenerEndpoint>
listen(final SocketAddress address, final URIScheme scheme, final Object attachment, final FutureCallback<ListenerEndpoint> callback)

public Future<ListenerEndpoint>
listen(final SocketAddress address, final URIScheme scheme, final FutureCallback<ListenerEndpoint> callback)

public Future<ListenerEndpoint>
listen(final SocketAddress address, final URIScheme scheme)

public Future<ListenerEndpoint>
listen(final SocketAddress
the socket address to listen on.
address
,
final FutureCallback<ListenerEndpoint>
the result callback.
callback
)

Overrides org.apache.hc.core5.http.impl.bootstrap.AsyncServer.listen.

Implements org.apache.hc.core5.reactor.ConnectionAcceptor.listen.

Opens a new listener endpoint with the given socket address.
public Future<ListenerEndpoint>
Inherited from org.apache.hc.core5.http.impl.bootstrap.AsyncServer:
awaitShutdowncloseclosegetEndpointsgetIOReactorgetStatusinitiateShutdownlistenpauseresumestart

Field Detail

canonicalNameback to summary
private final String canonicalName

Constructor Detail

HttpAsyncServerback to summary
public HttpAsyncServer(final IOEventHandlerFactory eventHandlerFactory, final IOReactorConfig ioReactorConfig, final Decorator<IOSession> ioSessionDecorator, final Callback<Exception> exceptionCallback, final IOSessionListener sessionListener, final String canonicalName)

Use AsyncServerBootstrap to create instances of this class.

Annotations
@Internal
Since
5.1
HttpAsyncServerback to summary
public HttpAsyncServer(final IOEventHandlerFactory eventHandlerFactory, final IOReactorConfig ioReactorConfig, final Decorator<IOSession> ioSessionDecorator, final Callback<Exception> exceptionCallback, final IOSessionListener sessionListener)

Use AsyncServerBootstrap to create instances of this class.

Annotations
@Internal

Method Detail

listenback to summary
public Future<ListenerEndpoint> listen(final SocketAddress address, final URIScheme scheme, final Object attachment, final FutureCallback<ListenerEndpoint> callback)
Since
5.1
listenback to summary
public Future<ListenerEndpoint> listen(final SocketAddress address, final URIScheme scheme, final FutureCallback<ListenerEndpoint> callback)
Since
5.1
listenback to summary
public Future<ListenerEndpoint> listen(final SocketAddress address, final URIScheme scheme)
Since
5.1
listenback to summary
public Future<ListenerEndpoint> listen(final SocketAddress address, final FutureCallback<ListenerEndpoint> callback)

Overrides org.apache.hc.core5.http.impl.bootstrap.AsyncServer.listen.

Implements org.apache.hc.core5.reactor.ConnectionAcceptor.listen.

Doc from org.apache.hc.core5.reactor.ConnectionAcceptor.listen.

Opens a new listener endpoint with the given socket address. Once the endpoint is fully initialized it starts accepting incoming connections and propagates I/O activity notifications to the I/O event dispatcher.

Parameters
address:SocketAddress

the socket address to listen on.

callback:FutureCallback<ListenerEndpoint>

the result callback.

Returns:Future<ListenerEndpoint>

listener endpoint.

Annotations
@Deprecated
@Override
listenback to summary
public Future<ListenerEndpoint> listen(final SocketAddress address)

Overrides org.apache.hc.core5.http.impl.bootstrap.AsyncServer.listen.

Annotations
@Deprecated
@Override