Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.nio.client.methods
Class HttpAsyncMethods

    java.lang.Object
      org.apache.http.nio.client.methods.HttpAsyncMethods

    public final class HttpAsyncMethods

extends Object

Factory methods for asynchronous request producers and response consumers.

Since:
  4.0

Constructor Summary
`HttpAsyncMethods()`

Method Summary
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `create(org.apache.http.HttpHost target, org.apache.http.HttpRequest request)` Creates asynchronous request generator for the given request message.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `create(org.apache.http.client.methods.HttpUriRequest request)` Creates asynchronous request generator for the given request message.
`static org.apache.http.nio.protocol.HttpAsyncResponseConsumer<org.apache.http.HttpResponse>` | `createConsumer()` Creates basic response consumer that will buffer response content in memory.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createDelete(String requestURI)` Creates asynchronous `DELETE` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createDelete(URI requestURI)` Creates asynchronous `DELETE` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createGet(String requestURI)` Creates asynchronous `GET` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createGet(URI requestURI)` Creates asynchronous `GET` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createHead(String requestURI)` Creates asynchronous `HEAD` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createHead(URI requestURI)` Creates asynchronous `HEAD` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createOptions(String requestURI)` Creates asynchronous `OPTIONS` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createOptions(URI requestURI)` Creates asynchronous `OPTIONS` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createPost(String requestURI, byte[] content, org.apache.http.entity.ContentType contentType)` Creates asynchronous `POST` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createPost(String requestURI, String content, org.apache.http.entity.ContentType contentType)` Creates asynchronous `POST` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createPost(URI requestURI, byte[] content, org.apache.http.entity.ContentType contentType)` Creates asynchronous `POST` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createPost(URI requestURI, String content, org.apache.http.entity.ContentType contentType)` Creates asynchronous `POST` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createPut(String requestURI, byte[] content, org.apache.http.entity.ContentType contentType)` Creates asynchronous `PUT` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createPut(String requestURI, String content, org.apache.http.entity.ContentType contentType)` Creates asynchronous `PUT` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createPut(URI requestURI, byte[] content, org.apache.http.entity.ContentType contentType)` Creates asynchronous `PUT` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createPut(URI requestURI, String content, org.apache.http.entity.ContentType contentType)` Creates asynchronous `PUT` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createTrace(String requestURI)` Creates asynchronous `TRACE` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createTrace(URI requestURI)` Creates asynchronous `TRACE` request generator.
`static org.apache.http.nio.protocol.HttpAsyncResponseConsumer<org.apache.http.HttpResponse>` | `createZeroCopyConsumer(File file)` Creates zero-copy response consumer that will stream response content directly to the given file.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createZeroCopyPost(String requestURI, File content, org.apache.http.entity.ContentType contentType)` Creates asynchronous zero-copy `POST` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createZeroCopyPost(URI requestURI, File content, org.apache.http.entity.ContentType contentType)` Creates asynchronous zero-copy `POST` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createZeroCopyPut(String requestURI, File content, org.apache.http.entity.ContentType contentType)` Creates asynchronous zero-copy `PUT` request generator.
`static org.apache.http.nio.protocol.HttpAsyncRequestProducer` | `createZeroCopyPut(URI requestURI, File content, org.apache.http.entity.ContentType contentType)` Creates asynchronous zero-copy `PUT` request generator.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HttpAsyncMethods

    public HttpAsyncMethods()

Method Detail

### create

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer create(org.apache.http.HttpHost target,
                                                                               org.apache.http.HttpRequest request)

  Creates asynchronous request generator for the given request message.

  Parameters:
    `target` - request target.
    `request` - request message.
  Returns:
    asynchronous request generator

### create

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer create(org.apache.http.client.methods.HttpUriRequest request)

  Creates asynchronous request generator for the given request message.

  Parameters:
    `request` - request message.
  Returns:
    asynchronous request generator

### createGet

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createGet(URI requestURI)

  Creates asynchronous `GET` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createGet

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createGet(String requestURI)

  Creates asynchronous `GET` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createHead

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createHead(URI requestURI)

  Creates asynchronous `HEAD` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createHead

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createHead(String requestURI)

  Creates asynchronous `HEAD` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createDelete

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createDelete(URI requestURI)

  Creates asynchronous `DELETE` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createDelete

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createDelete(String requestURI)

  Creates asynchronous `DELETE` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createOptions

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createOptions(URI requestURI)

  Creates asynchronous `OPTIONS` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createOptions

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createOptions(String requestURI)

  Creates asynchronous `OPTIONS` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createTrace

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createTrace(URI requestURI)

  Creates asynchronous `TRACE` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createTrace

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createTrace(String requestURI)

  Creates asynchronous `TRACE` request generator.

  Parameters:
    `requestURI` - request URI.
  Returns:
    asynchronous request generator

### createPost

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createPost(URI requestURI,
                                                                                   String content,
                                                                                   org.apache.http.entity.ContentType contentType)
                                                                            throws UnsupportedEncodingException

  Creates asynchronous `POST` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator
  Throws:
    `UnsupportedEncodingException`

### createPost

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createPost(String requestURI,
                                                                                   String content,
                                                                                   org.apache.http.entity.ContentType contentType)
                                                                            throws UnsupportedEncodingException

  Creates asynchronous `POST` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator
  Throws:
    `UnsupportedEncodingException`

### createPost

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createPost(URI requestURI,
                                                                                   byte[] content,
                                                                                   org.apache.http.entity.ContentType contentType)

  Creates asynchronous `POST` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator

### createPost

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createPost(String requestURI,
                                                                                   byte[] content,
                                                                                   org.apache.http.entity.ContentType contentType)

  Creates asynchronous `POST` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator

### createPut

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createPut(URI requestURI,
                                                                                  String content,
                                                                                  org.apache.http.entity.ContentType contentType)
                                                                           throws UnsupportedEncodingException

  Creates asynchronous `PUT` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator
  Throws:
    `UnsupportedEncodingException`

### createPut

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createPut(String requestURI,
                                                                                  String content,
                                                                                  org.apache.http.entity.ContentType contentType)
                                                                           throws UnsupportedEncodingException

  Creates asynchronous `PUT` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator
  Throws:
    `UnsupportedEncodingException`

### createPut

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createPut(URI requestURI,
                                                                                  byte[] content,
                                                                                  org.apache.http.entity.ContentType contentType)

  Creates asynchronous `PUT` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator

### createPut

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createPut(String requestURI,
                                                                                  byte[] content,
                                                                                  org.apache.http.entity.ContentType contentType)

  Creates asynchronous `PUT` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator

### createZeroCopyPost

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createZeroCopyPost(URI requestURI,
                                                                                           File content,
                                                                                           org.apache.http.entity.ContentType contentType)
                                                                                    throws FileNotFoundException

  Creates asynchronous zero-copy `POST` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator
  Throws:
    `FileNotFoundException`

### createZeroCopyPost

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createZeroCopyPost(String requestURI,
                                                                                           File content,
                                                                                           org.apache.http.entity.ContentType contentType)
                                                                                    throws FileNotFoundException

  Creates asynchronous zero-copy `POST` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator
  Throws:
    `FileNotFoundException`

### createZeroCopyPut

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createZeroCopyPut(URI requestURI,
                                                                                          File content,
                                                                                          org.apache.http.entity.ContentType contentType)
                                                                                   throws FileNotFoundException

  Creates asynchronous zero-copy `PUT` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator
  Throws:
    `FileNotFoundException`

### createZeroCopyPut

    public static org.apache.http.nio.protocol.HttpAsyncRequestProducer createZeroCopyPut(String requestURI,
                                                                                          File content,
                                                                                          org.apache.http.entity.ContentType contentType)
                                                                                   throws FileNotFoundException

  Creates asynchronous zero-copy `PUT` request generator.

  Parameters:
    `requestURI` - request URI.
    `content` - request content.
    `contentType` - request contentType.
  Returns:
    asynchronous request generator
  Throws:
    `FileNotFoundException`

### createConsumer

    public static org.apache.http.nio.protocol.HttpAsyncResponseConsumer<org.apache.http.HttpResponse> createConsumer()

  Creates basic response consumer that will buffer response content in memory.

  Returns:
    asynchronous response consumer.

### createZeroCopyConsumer

    public static org.apache.http.nio.protocol.HttpAsyncResponseConsumer<org.apache.http.HttpResponse> createZeroCopyConsumer(File file)
                                                                                                                       throws FileNotFoundException

  Creates zero-copy response consumer that will stream response content directly to the given file.

  Returns:
    asynchronous response consumer.
  Throws:
    `FileNotFoundException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.