Save This Page
Home » axis2-1.5-src » org.apache » axis2 » util » [javadoc | source]
org.apache.axis2.util
public class: Utils [javadoc | source]
java.lang.Object
   org.apache.axis2.util.Utils
Method from org.apache.axis2.util.Utils Summary:
addHandler,   calculateDefaultModuleVersion,   checkVersion,   createOutMessageContext,   createSimpleInOnlyService,   createSimpleService,   createSimpleService,   createSimpleServiceforClient,   createSimpleServiceforClient,   fillContextInformation,   getAxisSpecifMEPConstant,   getHostname,   getInboundFaultFromMessageContext,   getIpAddress,   getIpAddress,   getModuleName,   getModuleName,   getModuleVersion,   getMtomThreshold,   getNewConfigurationContext,   getObjectClassLoader,   getParameterValue,   isExplicitlyTrue,   isLatest,   parseRequestURLForServiceAndOperation
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.axis2.util.Utils Detail:
 public static  void addHandler(Flow flow,
    Handler handler,
    String phaseName) 
 public static  void calculateDefaultModuleVersion(HashMap modules,
    AxisConfiguration axisConfig) 
 public static boolean checkVersion(String module1version,
    String module2version) throws AxisFault 
    - if he trying to engage the same module then method will returen false - else it will return true
 public static MessageContext createOutMessageContext(MessageContext inMessageContext) throws AxisFault 
Deprecated! ( - post1.1branch)

 public static AxisService createSimpleInOnlyService(QName serviceName,
    MessageReceiver messageReceiver,
    QName opName) throws AxisFault 
 public static AxisService createSimpleService(QName serviceName,
    String className,
    QName opName) throws AxisFault 
 public static AxisService createSimpleService(QName serviceName,
    MessageReceiver messageReceiver,
    String className,
    QName opName) throws AxisFault 
 public static AxisService createSimpleServiceforClient(QName serviceName,
    String className,
    QName opName) throws AxisFault 
 public static AxisService createSimpleServiceforClient(QName serviceName,
    MessageReceiver messageReceiver,
    String className,
    QName opName) throws AxisFault 
 public static ServiceContext fillContextInformation(AxisService axisService,
    ConfigurationContext configurationContext) throws AxisFault 
 public static int getAxisSpecifMEPConstant(String messageExchangePattern) 
    Maps the String URI of the Message exchange pattern to a integer. Further, in the first lookup, it will cache the looked up value so that the subsequent method calls are extremely efficient.
 public static String getHostname(AxisConfiguration axisConfiguration) 
    First check whether the hostname parameter is there in AxisConfiguration (axis2.xml) , if it is there then this will return that as the host name , o.w will return the IP address.
 public static AxisFault getInboundFaultFromMessageContext(MessageContext messageContext) 
    Get an AxisFault object to represent the SOAPFault in the SOAPEnvelope attached to the provided MessageContext. This first check for an already extracted AxisFault and otherwise does a simple extract.

    MUST NOT be passed a MessageContext which does not contain a SOAPFault

 public static String getIpAddress() throws SocketException 
    Returns the ip address to be used for the replyto epr CAUTION: This will go through all the available network interfaces and will try to return an ip address. First this will try to get the first IP which is not loopback address (127.0.0.1). If none is found then this will return this will return 127.0.0.1. This will not consider IPv6 addresses.

    TODO: - Improve this logic to genaralize it a bit more - Obtain the ip to be used here from the Call API

 public static String getIpAddress(AxisConfiguration axisConfiguration) throws SocketException 
    First check whether the hostname parameter is there in AxisConfiguration (axis2.xml) , if it is there then this will retun that as the host name , o.w will return the IP address.
 public static String getModuleName(String moduleName) 
    Get the name of the module , where archive name is combination of module name + its version The format of the name is as follows: moduleName-00.0000 Example: "addressing-01.0001.mar" would return "addressing"
 public static String getModuleName(String moduleName,
    String moduleVersion) 
 public static String getModuleVersion(String moduleName) 
 public static int getMtomThreshold(MessageContext msgCtxt) 
 public static ConfigurationContext getNewConfigurationContext(String repositry) throws Exception 
 public static ClassLoader getObjectClassLoader(Object object) 
    This method will provide the logic needed to retrieve an Object's classloader in a Java 2 Security compliant manner.
 public static String getParameterValue(Parameter param) 
 public static boolean isExplicitlyTrue(MessageContext messageContext,
    String propertyName) 
Deprecated! please - use MessageContext.isTrue(propertyName) instead

    Check if a MessageContext property is true.
 public static boolean isLatest(String moduleVersion,
    String currentDefaultVersion) 
 public static String[] parseRequestURLForServiceAndOperation(String path,
    String servicePath) 
    Break a full path into pieces