org.apache.synapse.transport.nhttp

## Class Axis2HttpRequest

- java.lang.Object
- - org.apache.synapse.transport.nhttp.Axis2HttpRequest

-     public class Axis2HttpRequest
      extends java.lang.Object

  Represents an outgoing Axis2 HTTP/s request. It holds the EPR of the destination, the Axis2 MessageContext to be sent, an HttpHost object which captures information about the destination, and a Pipe used to write the message stream to the destination

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Axis2HttpRequest(org.apache.axis2.addressing.EndpointReference epr, org.apache.http.conn.routing.HttpRoute route, org.apache.axis2.context.MessageContext msgContext)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `java.lang.String` | `getEndpointURLPrefix()`
    `org.apache.axis2.addressing.EndpointReference` | `getEpr()`
    `org.apache.axis2.context.MessageContext` | `getMsgContext()`
    `org.apache.http.HttpRequest` | `getRequest()` Create and return a new HttpPost request to the destination EPR
    `org.apache.http.conn.routing.HttpRoute` | `getRoute()`
    `int` | `getTimeout()`
    `boolean` | `isCompleted()`
    `boolean` | `isSendingCompleted()`
    `void` | `setCompleted(boolean completed)`
    `void` | `setEndpointURLPrefix(java.lang.String endpointURLPrefix)`
    `void` | `setOutputBuffer(org.apache.http.nio.util.ContentOutputBuffer outputBuffer)`
    `void` | `setReadyToStream(boolean readyToStream)`
    `void` | `setSendingCompleted(boolean sendingCompleted)`
    `void` | `setTimeout(int timeout)`
    `void` | `streamMessageContents()` Start streaming the message into the Pipe, so that the contents could be read off the source channel returned by getSourceChannel()
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Axis2HttpRequest

          public Axis2HttpRequest(org.apache.axis2.addressing.EndpointReference epr,
                                  org.apache.http.conn.routing.HttpRoute route,
                                  org.apache.axis2.context.MessageContext msgContext)

  - ### Method Detail

    - #### setReadyToStream

          public void setReadyToStream(boolean readyToStream)

    - #### setOutputBuffer

          public void setOutputBuffer(org.apache.http.nio.util.ContentOutputBuffer outputBuffer)

    - #### clear

          public void clear()

    - #### getEpr

          public org.apache.axis2.addressing.EndpointReference getEpr()

    - #### getRoute

          public org.apache.http.conn.routing.HttpRoute getRoute()

    - #### getMsgContext

          public org.apache.axis2.context.MessageContext getMsgContext()

    - #### getTimeout

          public int getTimeout()

    - #### setTimeout

          public void setTimeout(int timeout)

    - #### getEndpointURLPrefix

          public java.lang.String getEndpointURLPrefix()

    - #### setEndpointURLPrefix

          public void setEndpointURLPrefix(java.lang.String endpointURLPrefix)

    - #### getRequest

          public org.apache.http.HttpRequest getRequest()
                                                 throws java.io.IOException,
                                                        org.apache.http.HttpException

      Create and return a new HttpPost request to the destination EPR
      Returns:
        the HttpRequest to be sent out
      Throws:
        `java.io.IOException` - in error retrieving the `HttpRequest`
        `org.apache.http.HttpException`

    - #### streamMessageContents

          public void streamMessageContents()
                                     throws org.apache.axis2.AxisFault

      Start streaming the message into the Pipe, so that the contents could be read off the source channel returned by getSourceChannel()
      Throws:
        `org.apache.axis2.AxisFault` - on error

    - #### isCompleted

          public boolean isCompleted()

    - #### setCompleted

          public void setCompleted(boolean completed)

    - #### isSendingCompleted

          public boolean isSendingCompleted()

    - #### setSendingCompleted

          public void setSendingCompleted(boolean sendingCompleted)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.