public class NhttpUtil extends Object
Constructor and Description |
---|
NhttpUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getContentType(org.apache.axis2.context.MessageContext msgContext)
Get the content type for the message passed in
|
static org.apache.axis2.addressing.EndpointReference |
getDestinationEPR(org.apache.axis2.context.MessageContext msgContext)
Get the EPR for the message passed in
|
static String |
getHostName(InetAddress address)
This method tries to determine the hostname of the given InetAddress without
triggering a reverse DNS lookup.
|
static org.apache.axiom.om.OMOutputFormat |
getOMOutputFormat(org.apache.axis2.context.MessageContext msgContext)
Retirn the OMOutputFormat to be used for the message context passed in
|
public static String getHostName(InetAddress address)
InetAddress.getHostName()
triggers a reverse DNS lookup which can be very costly in cases where reverse
DNS fails. Tries to parse a symbolic hostname from InetAddress.toString()
,
which is documented to return a String of the form "hostname / literal IP address"
with 'hostname' blank if not already computed & stored in address
If the hostname cannot be determined from InetAddress.toString(),
the value of InetAddress.getHostAddress()
is returned.address
- The InetAddress whose hostname has to be determinedpublic static org.apache.axis2.addressing.EndpointReference getDestinationEPR(org.apache.axis2.context.MessageContext msgContext)
msgContext
- the message contextpublic static org.apache.axiom.om.OMOutputFormat getOMOutputFormat(org.apache.axis2.context.MessageContext msgContext)
msgContext
- the message contextpublic static String getContentType(org.apache.axis2.context.MessageContext msgContext)
msgContext
- the messageCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.