org.apache.synapse.transport.passthru.api

## Class PassThroughNHttpGetProcessor

- java.lang.Object
- - org.apache.synapse.transport.passthru.api.PassThroughNHttpGetProcessor

- All Implemented Interfaces:
    HttpGetRequestProcessor

      public class PassThroughNHttpGetProcessor
      extends java.lang.Object
      implements HttpGetRequestProcessor

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.axis2.context.ConfigurationContext` | `cfgCtx`
    `protected SourceHandler` | `sourceHandler`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PassThroughNHttpGetProcessor()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `generateWsdl(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, java.io.OutputStream os, java.lang.String serviceName, java.util.Map<java.lang.String,java.lang.String> parameters)` Generate WSDL.
    `protected void` | `generateWsdl2(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, java.io.OutputStream os, java.lang.String serviceName)` Generate WSDL2.
    `protected void` | `generateXsd(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, java.io.OutputStream os, java.lang.String serviceName, java.util.Map<java.lang.String,java.lang.String> parameters)` Generates Schema.
    `protected static java.lang.String` | `getIpAddress()` Whatever this method returns as the IP is ignored by the actual http/s listener when its getServiceEPR is invoked.
    `protected java.lang.String` | `getServiceName(org.apache.http.HttpRequest request)` Returns the service name.
    `protected void` | `handleBrowserException(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, java.io.OutputStream os, java.lang.String msg, java.lang.Exception e)` Handles browser exception.
    `void` | `init(org.apache.axis2.context.ConfigurationContext cfgCtx, SourceHandler handler)` Initialize the HttpGetProcessor
    `protected static boolean` | `isIP(java.lang.String hostAddress)`
    `protected boolean` | `isServiceListBlocked(java.lang.String incomingURI)` Is the incoming URI is requesting service list and http.block_service_list=true in nhttp.properties
    `protected boolean` | `isWSDLProvidedForProxyService(org.apache.axis2.description.AxisService service)` Checks whether a wsdl is provided for a proxy service.
    `void` | `process(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, java.io.OutputStream ostream, boolean isRestDispatching)` Process the HTTP GET request.

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

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

- - ### Field Detail

    - #### cfgCtx

          protected org.apache.axis2.context.ConfigurationContext cfgCtx

    - #### sourceHandler

          protected SourceHandler sourceHandler

  - ### Constructor Detail

    - #### PassThroughNHttpGetProcessor

          public PassThroughNHttpGetProcessor()

  - ### Method Detail

    - #### init

          public void init(org.apache.axis2.context.ConfigurationContext cfgCtx,
                           SourceHandler handler)
                    throws org.apache.axis2.AxisFault

      Description copied from interface: `HttpGetRequestProcessor`
      Initialize the HttpGetProcessor
      Specified by:
        `init` in interface `HttpGetRequestProcessor`
      Parameters:
        `cfgCtx` - servers configuration context
      Throws:
        `org.apache.axis2.AxisFault` - if an error occurs

    - #### process

          public void process(org.apache.http.HttpRequest request,
                              org.apache.http.HttpResponse response,
                              org.apache.axis2.context.MessageContext msgContext,
                              org.apache.http.nio.NHttpServerConnection conn,
                              java.io.OutputStream ostream,
                              boolean isRestDispatching)

      Description copied from interface: `HttpGetRequestProcessor`
      Process the HTTP GET request.
      Specified by:
        `process` in interface `HttpGetRequestProcessor`
      Parameters:
        `request` - The HttpRequest
        `response` - The HttpResponse
        `msgContext` - The MessageContext
        `conn` - The NHttpServerConnection
        `ostream` - The OutputStream
        `isRestDispatching` - Rest dispatching

    - #### generateWsdl

          protected void generateWsdl(org.apache.http.HttpResponse response,
                                      org.apache.axis2.context.MessageContext msgContext,
                                      org.apache.http.nio.NHttpServerConnection conn,
                                      java.io.OutputStream os,
                                      java.lang.String serviceName,
                                      java.util.Map<java.lang.String,java.lang.String> parameters)

      Generate WSDL.
      Parameters:
        `response` - HttpResponse
        `msgContext` - MessageContext
        `conn` - NHttpServerConnection
        `os` - OutputStream
        `serviceName` - service name
        `parameters` - parameters

    - #### generateWsdl2

          protected void generateWsdl2(org.apache.http.HttpResponse response,
                                       org.apache.axis2.context.MessageContext msgContext,
                                       org.apache.http.nio.NHttpServerConnection conn,
                                       java.io.OutputStream os,
                                       java.lang.String serviceName)

      Generate WSDL2.
      Parameters:
        `response` - HttpResponse
        `msgContext` - MessageContext
        `conn` - NHttpServerConnection
        `os` - OutputStream
        `serviceName` - service name

    - #### getServiceName

          protected java.lang.String getServiceName(org.apache.http.HttpRequest request)

      Returns the service name.
      Parameters:
        `request` - HttpRequest
      Returns:
        service name as a String

    - #### generateXsd

          protected void generateXsd(org.apache.http.HttpResponse response,
                                     org.apache.axis2.context.MessageContext msgContext,
                                     org.apache.http.nio.NHttpServerConnection conn,
                                     java.io.OutputStream os,
                                     java.lang.String serviceName,
                                     java.util.Map<java.lang.String,java.lang.String> parameters)

      Generates Schema.
      Parameters:
        `response` - HttpResponse
        `msgContext` - Current MessageContext
        `conn` - NHttpServerConnection
        `os` - OutputStream
        `serviceName` - service name
        `parameters` - url parameters

    - #### handleBrowserException

          protected void handleBrowserException(org.apache.http.HttpResponse response,
                                                org.apache.axis2.context.MessageContext msgContext,
                                                org.apache.http.nio.NHttpServerConnection conn,
                                                java.io.OutputStream os,
                                                java.lang.String msg,
                                                java.lang.Exception e)

      Handles browser exception.
      Parameters:
        `response` - HttpResponse
        `conn` - NHttpServerConnection
        `os` - OutputStream
        `msg` - message
        `e` - Exception

    - #### isServiceListBlocked

          protected boolean isServiceListBlocked(java.lang.String incomingURI)

      Is the incoming URI is requesting service list and http.block_service_list=true in nhttp.properties
      Parameters:
        `incomingURI` - incoming URI
      Returns:
        whether to proceed with incomingURI

    - #### isWSDLProvidedForProxyService

          protected boolean isWSDLProvidedForProxyService(org.apache.axis2.description.AxisService service)

      Checks whether a wsdl is provided for a proxy service.
      Parameters:
        `service` - AxisService
      Returns:
        whether the wsdl is provided or not

    - #### getIpAddress

          protected static java.lang.String getIpAddress()
                                                  throws java.net.SocketException

      Whatever this method returns as the IP is ignored by the actual http/s listener when its getServiceEPR is invoked. This was originally copied from axis2
      Returns:
        Returns String.
      Throws:
        `java.net.SocketException` - if the socket can not be accessed

    - #### isIP

          protected static boolean isIP(java.lang.String hostAddress)

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