Class Utils


  • public class Utils
    extends Object
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • getProtocolPort

        public static int getProtocolPort​(String protocol)
      • getStartedWebapp

        public static org.wso2.carbon.webapp.mgt.WebApplication getStartedWebapp​(String path)
        Get the details of a deployed webApp
        Parameters:
        path - URI path
        Returns:
        meta data for webapp
      • getStartedTenantWebapp

        public static org.wso2.carbon.webapp.mgt.WebApplication getStartedTenantWebapp​(String tenantDomain,
                                                                                       String path)
        Get the details of a deployed webapp for tenants
        Parameters:
        path - URI path
        Returns:
        meta data for webapp
      • getHostname

        public static String getHostname​(String host)
      • getContext

        public static String getContext​(String uri)
      • createEndpoint

        public static org.apache.synapse.endpoints.Endpoint createEndpoint​(String addressURI,
                                                                           org.apache.synapse.core.SynapseEnvironment environment)
      • setIntegratorHeader

        public static void setIntegratorHeader​(org.apache.synapse.MessageContext synCtx,
                                               String uri)
      • isDataService

        public static boolean isDataService​(org.apache.axis2.context.MessageContext messageContext)
                                     throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • isTenantDataService

        public static boolean isTenantDataService​(org.apache.axis2.context.MessageContext messageContext)
                                           throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • rewriteLocationHeader

        public static void rewriteLocationHeader​(String location,
                                                 org.apache.synapse.MessageContext messageContext)
        In this method we rewrite the location header which comes from the tomcat transport.
        Parameters:
        location - location url
        messageContext - message context.
      • isStatefulService

        public static boolean isStatefulService​(org.apache.axis2.description.AxisService axisService)
        In this method check we check whether that particular service is a admin service or session enabled service.
        Parameters:
        axisService - AxisService
        Returns:
        isStatefulService boolean