Package org.apache.hc.core5.testing.nio
Class ClientSessionEndpoint
- java.lang.Object
-
- org.apache.hc.core5.testing.nio.ClientSessionEndpoint
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,ModalCloseable
@Contract(threading=SAFE_CONDITIONAL) public final class ClientSessionEndpoint extends java.lang.Object implements ModalCloseable
Client endpoint that can be used to initiate HTTP message exchanges.- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description ClientSessionEndpoint(IOSession ioSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidclose(CloseMode closeMode)Closes this process or endpoint and releases any system resources associated with it.voidexecute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)voidexecute(AsyncClientExchangeHandler exchangeHandler, HttpContext context)<T> java.util.concurrent.Future<T>execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, FutureCallback<T> callback)<T> java.util.concurrent.Future<T>execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context, FutureCallback<T> callback)<T> java.util.concurrent.Future<T>execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HttpContext context, FutureCallback<T> callback)voidexecute(Command command, Command.Priority priority)booleanisOpen()java.lang.StringtoString()
-
-
-
Field Detail
-
ioSession
private final IOSession ioSession
-
closed
private final java.util.concurrent.atomic.AtomicBoolean closed
-
-
Constructor Detail
-
ClientSessionEndpoint
public ClientSessionEndpoint(IOSession ioSession)
-
-
Method Detail
-
execute
public void execute(Command command, Command.Priority priority)
-
execute
public void execute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)
-
execute
public void execute(AsyncClientExchangeHandler exchangeHandler, HttpContext context)
-
execute
public <T> java.util.concurrent.Future<T> execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context, FutureCallback<T> callback)
-
execute
public <T> java.util.concurrent.Future<T> execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HttpContext context, FutureCallback<T> callback)
-
execute
public <T> java.util.concurrent.Future<T> execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, FutureCallback<T> callback)
-
isOpen
public boolean isOpen()
-
close
public void close(CloseMode closeMode)
Description copied from interface:ModalCloseableCloses this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect.- Specified by:
closein interfaceModalCloseable- Parameters:
closeMode- How to close the receiver.
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-