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 void
close()
void
close(CloseMode closeMode)
Closes this process or endpoint and releases any system resources associated with it.void
execute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)
void
execute(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)
void
execute(Command command, Command.Priority priority)
boolean
isOpen()
java.lang.String
toString()
-
-
-
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:ModalCloseable
Closes 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:
close
in interfaceModalCloseable
- Parameters:
closeMode
- How to close the receiver.
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-