|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.transport.nhttp.util.NhttpUtil
public class NhttpUtil
A useful set of utility methods for the HTTP transport
| Constructor Summary | |
|---|---|
NhttpUtil()
|
|
| Method Summary | |
|---|---|
static String |
getContentType(MessageContext msgContext)
Get the content type for the message passed in |
static EndpointReference |
getDestinationEPR(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 OMOutputFormat |
getOMOutputFormat(MessageContext msgContext)
Retirn the OMOutputFormat to be used for the message context passed in |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NhttpUtil()
| Method Detail |
|---|
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 determined
public static EndpointReference getDestinationEPR(MessageContext msgContext)
msgContext - the message context
public static OMOutputFormat getOMOutputFormat(MessageContext msgContext)
msgContext - the message context
public static String getContentType(MessageContext msgContext)
msgContext - the message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||