HttpTester.Request request = HttpTester.newRequest();
request.setURI("/some/resource");
HttpTester.Response response =
HttpTester.parseResponse(HttpTester.from(localConnector.getResponse(request.generate())));
| Modifier and Type | Class and Description |
|---|---|
| public class | LocalConnector.
Local EndPoint |
| Modifier and Type | Field and Description |
|---|---|
| private final BlockingQueue |
| Access | Constructor and Description |
|---|---|
| public | LocalConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, int acceptors, ConnectionFactory... factories)
|
| public | |
| public | |
| public | |
| public | LocalConnector(Server server, ConnectionFactory connectionFactory, SslContextFactory.
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public LocalConnector. | |
| public LocalConnector. | Returns: the local endpointthe request rawRequest)Execute a request and return the EndPoint through which multiple responses can be received or more input provided. |
| private LocalConnector. | |
| public ByteBuffer | Returns: ByteBuffer containing response or null.The request to send requestsBuffer)Get a single response using a parser to search for the end of the message. |
| public ByteBuffer | Returns: ByteBuffer containing response or null.The request to send requestBuffer, long The time to wait time, TimeUnit The units of the wait unit)Get a single response using a parser to search for the end of the message. |
| public ByteBuffer | Returns: ByteBuffer containing response or null.The request to send requestBuffer, boolean True if the response is for a head request head, long The time to wait time, TimeUnit The units of the wait unit)Get a single response using a parser to search for the end of the message. |
| public String | Returns: ByteBuffer containing response or null.The request to send rawRequest)Get a single response using a parser to search for the end of the message. |
| public String | Returns: ByteBuffer containing response or null.The request to send rawRequest, long The time to wait time, TimeUnit The units of the wait unit)Get a single response using a parser to search for the end of the message. |
| public String | Returns: ByteBuffer containing response or null.The request to send rawRequest, boolean True if the response is for a head request head, long The time to wait time, TimeUnit The units of the wait unit)Get a single response using a parser to search for the end of the message. |
| public Object | getTransport()
Implements org. Get the underlying socket, channel, buffer etc. for the connector.. |
| _connects | back to summary |
|---|---|
| private final BlockingQueue<LocalConnector. | |
| LocalConnector | back to summary |
|---|---|
| public LocalConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, int acceptors, ConnectionFactory... factories) | |
| LocalConnector | back to summary |
|---|---|
| public LocalConnector(Server server) | |
| LocalConnector | back to summary |
|---|---|
| public LocalConnector(Server server, SslContextFactory. | |
| LocalConnector | back to summary |
|---|---|
| public LocalConnector(Server server, ConnectionFactory connectionFactory) | |
| LocalConnector | back to summary |
|---|---|
| public LocalConnector(Server server, ConnectionFactory connectionFactory, SslContextFactory. | |
| accept | back to summary |
|---|---|
| protected void accept(int acceptorID) throws InterruptedException Implements abstract org.
| |
| connect | back to summary |
|---|---|
| public LocalConnector. | |
| executeRequest | back to summary |
|---|---|
| public LocalConnector. Execute a request and return the EndPoint through which multiple responses can be received or more input provided.
| |
| executeRequest | back to summary |
|---|---|
| private LocalConnector. | |
| getResponse | back to summary |
|---|---|
| public ByteBuffer getResponse(ByteBuffer requestsBuffer) throws Exception Get a single response using a parser to search for the end of the message.
| |
| getResponse | back to summary |
|---|---|
| public ByteBuffer getResponse(ByteBuffer requestBuffer, long time, TimeUnit unit) throws Exception Get a single response using a parser to search for the end of the message.
| |
| getResponse | back to summary |
|---|---|
| public ByteBuffer getResponse(ByteBuffer requestBuffer, boolean head, long time, TimeUnit unit) throws Exception Get a single response using a parser to search for the end of the message.
| |
| getResponse | back to summary |
|---|---|
| public String getResponse(String rawRequest) throws Exception Get a single response using a parser to search for the end of the message. | |
| getResponse | back to summary |
|---|---|
| public String getResponse(String rawRequest, long time, TimeUnit unit) throws Exception Get a single response using a parser to search for the end of the message. | |
| getResponse | back to summary |
|---|---|
| public String getResponse(String rawRequest, boolean head, long time, TimeUnit unit) throws Exception Get a single response using a parser to search for the end of the message. | |
| getTransport | back to summary |
|---|---|
| public Object getTransport() Implements org. Doc from org. Get the underlying socket, channel, buffer etc. for the connector.. | |
| Modifier and Type | Field and Description |
|---|---|
| private final CountDownLatch | |
| private ByteBuffer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | |
| public String | Returns: Buffer containing full response or null for EOF;Wait for a response using a parser to detect the end of message |
| public String | Returns: Buffer containing full response or null for EOF;whether the request is a HEAD request head, long the maximum time to wait time, TimeUnit the time unit of the unit)timeout argumentWait for a response using a parser to detect the end of message |
| public ByteBuffer | Returns: the remaining response data bufferRemaining output ByteBuffer after calls to |
| public void | onClose(Throwable
The reason for the close, or null if a normal close. cause)Overrides org. Implements org. Callback method invoked when this |
| public ByteBuffer | Returns: Buffer containing full response or null for EOF;whether the request is a HEAD request head, long the maximum time to wait time, TimeUnit the time unit of the unit)timeout argumentWait for a response using a parser to detect the end of message |
| public ByteBuffer | Returns: Buffer containing full response or null for EOF;whether the request is a HEAD request head, long the maximum time to wait time, TimeUnit the time unit of the unit, Consumer<Integer> timeout argumenta consumer to be called with the response's status code statusConsumer)Wait for a response using a parser to detect the end of message |
| public void | |
| public void |
| _closed | back to summary |
|---|---|
| private final CountDownLatch _closed | |
| _responseData | back to summary |
|---|---|
| private ByteBuffer _responseData | |
| LocalEndPoint | back to summary |
|---|---|
| public LocalEndPoint() | |
| doShutdownOutput | back to summary |
|---|---|
| public void doShutdownOutput() Overrides org.
| |
| execute | back to summary |
|---|---|
| protected void execute(Runnable task) Overrides org.
| |
| getResponse | back to summary |
|---|---|
| public String getResponse() throws Exception Wait for a response using a parser to detect the end of message | |
| getResponse | back to summary |
|---|---|
| public String getResponse(boolean head, long time, TimeUnit unit) throws Exception Wait for a response using a parser to detect the end of message | |
| getResponseData | back to summary |
|---|---|
| public ByteBuffer getResponseData() Remaining output ByteBuffer after calls to
| |
| onClose | back to summary |
|---|---|
| public void onClose(Throwable cause) Overrides org. Implements org. Doc from org. Callback method invoked when this | |
| waitForResponse | back to summary |
|---|---|
| public ByteBuffer waitForResponse(boolean head, long time, TimeUnit unit) throws Exception Wait for a response using a parser to detect the end of message
| |
| waitForResponse | back to summary |
|---|---|
| public ByteBuffer waitForResponse(boolean head, long time, TimeUnit unit, Consumer<Integer> statusConsumer) throws Exception Wait for a response using a parser to detect the end of message
| |
| waitUntilClosed | back to summary |
|---|---|
| public void waitUntilClosed() | |
| waitUntilClosedOrIdleFor | back to summary |
|---|---|
| public void waitUntilClosedOrIdleFor(long idleFor, TimeUnit units) | |