public class DefaultHttpGetProcessor extends Object implements HttpGetRequestProcessor
Modifier and Type | Field and Description |
---|---|
protected org.apache.axis2.context.ConfigurationContext |
cfgCtx |
protected ServerHandler |
serverHandler |
Constructor and Description |
---|
DefaultHttpGetProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
generateServiceDetailsPage(org.apache.http.HttpResponse response,
org.apache.http.nio.NHttpServerConnection conn,
OutputStream os,
String serviceName)
Generates service details page.
|
protected void |
generateServicesList(org.apache.http.HttpResponse response,
org.apache.http.nio.NHttpServerConnection conn,
OutputStream os,
String servicePath)
Generates the services list.
|
protected void |
generateWsdl(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.axis2.context.MessageContext msgContext,
org.apache.http.nio.NHttpServerConnection conn,
OutputStream os,
String serviceName,
Map<String,String> parameters,
boolean isRestDispatching)
Generate WSDL.
|
protected void |
generateWsdl2(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.axis2.context.MessageContext msgContext,
org.apache.http.nio.NHttpServerConnection conn,
OutputStream os,
String serviceName,
boolean isRestDispatching)
Generate WSDL2.
|
protected void |
generateXsd(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.axis2.context.MessageContext messageCtx,
org.apache.http.nio.NHttpServerConnection conn,
OutputStream os,
String serviceName,
Map<String,String> parameters,
boolean isRestDispatching)
Generates Schema.
|
protected static String |
getIpAddress()
Whatever this method returns as the IP is ignored by the actual http/s listener when
its getServiceEPR is invoked.
|
protected String |
getServiceName(org.apache.http.HttpRequest request)
Returns the service name.
|
protected String |
getServicesHTML(String prefix)
Returns the HTML text for the list of services deployed.
|
protected void |
handleBrowserException(org.apache.http.HttpResponse response,
org.apache.http.nio.NHttpServerConnection conn,
OutputStream os,
String msg,
Exception e)
Handles browser exception.
|
protected void |
handleException(org.apache.http.HttpResponse response,
org.apache.axis2.context.MessageContext msgContext,
org.apache.http.nio.NHttpServerConnection conn,
OutputStream os,
String msg,
Exception e)
Handles exception.
|
void |
init(org.apache.axis2.context.ConfigurationContext cfgCtx,
ServerHandler serverHandler)
Initialize the HttpGetProcessor
|
protected static boolean |
isIP(String hostAddress) |
protected boolean |
isServiceListBlocked(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,
OutputStream os,
boolean isRestDispatching)
Process the HTTP GET request.
|
protected void |
processGetAndDelete(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.axis2.context.MessageContext msgContext,
org.apache.http.nio.NHttpServerConnection conn,
OutputStream os,
String method,
boolean isRestDispatching)
Calls the RESTUtil to process GET and DELETE Request
|
protected org.apache.axis2.context.ConfigurationContext cfgCtx
protected ServerHandler serverHandler
public void init(org.apache.axis2.context.ConfigurationContext cfgCtx, ServerHandler serverHandler) throws org.apache.axis2.AxisFault
HttpGetRequestProcessor
init
in interface HttpGetRequestProcessor
cfgCtx
- servers configuration contextserverHandler
- dispatching handlerorg.apache.axis2.AxisFault
- if an error occurspublic void process(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, boolean isRestDispatching)
process
in interface HttpGetRequestProcessor
request
- The HttpRequestresponse
- The HttpResponsemsgContext
- The MessageContextconn
- The NHttpServerConnectionos
- The OutputStreamisRestDispatching
- Rest dispatchingprotected boolean isServiceListBlocked(String incomingURI)
incomingURI
- incoming URIprotected String getServiceName(org.apache.http.HttpRequest request)
request
- HttpRequestprotected void generateServicesList(org.apache.http.HttpResponse response, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String servicePath)
response
- HttpResponseconn
- NHttpServerConnectionos
- OutputStreamservicePath
- service path of the serviceprotected void generateServiceDetailsPage(org.apache.http.HttpResponse response, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName)
response
- HttpResponseconn
- NHttpServerConnectionos
- OutputStreamserviceName
- service nameprotected void generateXsd(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext messageCtx, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName, Map<String,String> parameters, boolean isRestDispatching)
request
- HttpRequestresponse
- HttpResponsemessageCtx
- Current MessageContextconn
- NHttpServerConnectionos
- OutputStreamserviceName
- service nameparameters
- url parametersisRestDispatching
- Whether to handle this as RESTprotected void generateWsdl2(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName, boolean isRestDispatching)
request
- HttpRequestresponse
- HttpResponsemsgContext
- MessageContextconn
- NHttpServerConnectionos
- OutputStreamserviceName
- service nameisRestDispatching
- weather nhttp should do rest dispatchingprotected void generateWsdl(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName, Map<String,String> parameters, boolean isRestDispatching)
request
- HttpRequestresponse
- HttpResponsemsgContext
- MessageContextconn
- NHttpServerConnectionos
- OutputStreamserviceName
- service nameparameters
- parametersisRestDispatching
- if restDispatching is onprotected void processGetAndDelete(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String method, boolean isRestDispatching)
request
- HttpRequestresponse
- HttpResponsemsgContext
- MessageContextconn
- NHttpServerConnectionos
- OutputStreammethod
- HTTP method, either GET or DELETEisRestDispatching
- weather transport should do rest dispatchingprotected void handleException(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String msg, Exception e)
response
- HttpResponsemsgContext
- MessageContextconn
- NHttpServerConnectionos
- OutputStreammsg
- messagee
- Exceptionprotected void handleBrowserException(org.apache.http.HttpResponse response, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String msg, Exception e)
response
- HttpResponseconn
- NHttpServerConnectionos
- OutputStreammsg
- messagee
- Exceptionprotected boolean isWSDLProvidedForProxyService(org.apache.axis2.description.AxisService service)
service
- AxisServiceprotected static String getIpAddress() throws SocketException
SocketException
- if the socket can not be accessedprotected static boolean isIP(String hostAddress)
protected String getServicesHTML(String prefix)
prefix
- to be used for the Service namesCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.