Class HttpAsyncServer
- java.lang.Object
-
- org.apache.hc.core5.http.impl.bootstrap.AbstractConnectionInitiatorBase
-
- org.apache.hc.core5.http.impl.bootstrap.AsyncServer
-
- org.apache.hc.core5.http.impl.bootstrap.HttpAsyncServer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,ModalCloseable
,ConnectionAcceptor
,ConnectionInitiator
,IOReactor
,IOReactorService
public class HttpAsyncServer extends AsyncServer
HTTP/1.1 server side message exchange handler.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
canonicalName
-
Constructor Summary
Constructors Constructor Description HttpAsyncServer(IOEventHandlerFactory eventHandlerFactory, IOReactorConfig ioReactorConfig, Decorator<IOSession> ioSessionDecorator, Callback<java.lang.Exception> exceptionCallback, IOSessionListener sessionListener)
UseAsyncServerBootstrap
to create instances of this class.HttpAsyncServer(IOEventHandlerFactory eventHandlerFactory, IOReactorConfig ioReactorConfig, Decorator<IOSession> ioSessionDecorator, Callback<java.lang.Exception> exceptionCallback, IOSessionListener sessionListener, java.lang.String canonicalName)
UseAsyncServerBootstrap
to create instances of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.concurrent.Future<ListenerEndpoint>
listen(java.net.SocketAddress address)
Deprecated.java.util.concurrent.Future<ListenerEndpoint>
listen(java.net.SocketAddress address, FutureCallback<ListenerEndpoint> callback)
Deprecated.java.util.concurrent.Future<ListenerEndpoint>
listen(java.net.SocketAddress address, URIScheme scheme)
java.util.concurrent.Future<ListenerEndpoint>
listen(java.net.SocketAddress address, URIScheme scheme, java.lang.Object attachment, FutureCallback<ListenerEndpoint> callback)
java.util.concurrent.Future<ListenerEndpoint>
listen(java.net.SocketAddress address, URIScheme scheme, FutureCallback<ListenerEndpoint> callback)
-
Methods inherited from class org.apache.hc.core5.http.impl.bootstrap.AsyncServer
awaitShutdown, close, close, getEndpoints, getIOReactor, getStatus, initiateShutdown, listen, pause, resume, start
-
Methods inherited from class org.apache.hc.core5.http.impl.bootstrap.AbstractConnectionInitiatorBase
connect
-
-
-
-
Constructor Detail
-
HttpAsyncServer
@Internal public HttpAsyncServer(IOEventHandlerFactory eventHandlerFactory, IOReactorConfig ioReactorConfig, Decorator<IOSession> ioSessionDecorator, Callback<java.lang.Exception> exceptionCallback, IOSessionListener sessionListener, java.lang.String canonicalName)
UseAsyncServerBootstrap
to create instances of this class.- Since:
- 5.1
-
HttpAsyncServer
@Internal public HttpAsyncServer(IOEventHandlerFactory eventHandlerFactory, IOReactorConfig ioReactorConfig, Decorator<IOSession> ioSessionDecorator, Callback<java.lang.Exception> exceptionCallback, IOSessionListener sessionListener)
UseAsyncServerBootstrap
to create instances of this class.
-
-
Method Detail
-
listen
public java.util.concurrent.Future<ListenerEndpoint> listen(java.net.SocketAddress address, URIScheme scheme, java.lang.Object attachment, FutureCallback<ListenerEndpoint> callback)
- Since:
- 5.1
-
listen
public java.util.concurrent.Future<ListenerEndpoint> listen(java.net.SocketAddress address, URIScheme scheme, FutureCallback<ListenerEndpoint> callback)
- Since:
- 5.1
-
listen
public java.util.concurrent.Future<ListenerEndpoint> listen(java.net.SocketAddress address, URIScheme scheme)
- Since:
- 5.1
-
listen
@Deprecated public java.util.concurrent.Future<ListenerEndpoint> listen(java.net.SocketAddress address, FutureCallback<ListenerEndpoint> callback)
Deprecated.Description copied from interface:ConnectionAcceptor
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.- Specified by:
listen
in interfaceConnectionAcceptor
- Overrides:
listen
in classAsyncServer
- Parameters:
address
- the socket address to listen on.callback
- the result callback.- Returns:
- listener endpoint.
-
listen
@Deprecated public java.util.concurrent.Future<ListenerEndpoint> listen(java.net.SocketAddress address)
Deprecated.- Overrides:
listen
in classAsyncServer
-
-