public final class TenantAxisUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
cleanupTenants(long tenantIdleTimeMillis)
Traverse the list of tenants and cleanup tenants which have been idling for longer than
tenantIdleTimeMillis |
static List<org.wso2.carbon.user.core.tenant.Tenant> |
getActiveTenants(org.apache.axis2.context.ConfigurationContext mainConfigCtx)
Get the list of all active tenants in the system
|
static org.apache.axis2.description.AxisService |
getAxisService(String url,
org.apache.axis2.context.ConfigurationContext mainConfigContext) |
static long |
getLastAccessed(String tenantDomain,
org.apache.axis2.context.ConfigurationContext mainConfigCtx) |
static org.apache.axis2.engine.AxisConfiguration |
getTenantAxisConfiguration(String tenant,
org.apache.axis2.context.ConfigurationContext mainConfigCtx) |
static org.apache.axis2.context.ConfigurationContext |
getTenantConfigurationContext(String tenantDomain,
org.apache.axis2.context.ConfigurationContext mainConfigCtx) |
static org.apache.axis2.context.ConfigurationContext |
getTenantConfigurationContextFromUrl(String url,
org.apache.axis2.context.ConfigurationContext mainConfigCtx) |
static Map<String,org.apache.axis2.context.ConfigurationContext> |
getTenantConfigurationContexts(org.apache.axis2.context.ConfigurationContext mainConfigCtx)
Get all the tenant ConfigurationContexts
|
static String |
getTenantDomain(String url)
Calculate the tenant domain from the complete URL
|
static int |
getTenantId(org.apache.axis2.context.ConfigurationContext configCtx)
Deprecated.
use
MultitenantUtils.getTenantId(ConfigurationContext) |
static void |
initializeTenantTransports(org.apache.axis2.context.ConfigurationContext mainConfigCtx)
Set the transports for the tenants
|
static void |
setTenantAccessed(String tenantDomain,
org.apache.axis2.context.ConfigurationContext mainConfigCtx) |
static void |
setTenantTransports(org.apache.axis2.engine.AxisConfiguration mainAxisConfig,
String tenantDomain,
org.apache.axis2.engine.AxisConfiguration tenantAxisConfig) |
static void |
terminateTenantConfigContext(org.apache.axis2.context.ConfigurationContext tenantCfgCtx)
Terminate the provided Tenant ConfigurationContext
|
public static int getTenantId(org.apache.axis2.context.ConfigurationContext configCtx)
MultitenantUtils.getTenantId(ConfigurationContext)
configCtx
- The config contextpublic static org.apache.axis2.engine.AxisConfiguration getTenantAxisConfiguration(String tenant, org.apache.axis2.context.ConfigurationContext mainConfigCtx)
public static org.apache.axis2.context.ConfigurationContext getTenantConfigurationContextFromUrl(String url, org.apache.axis2.context.ConfigurationContext mainConfigCtx)
public static org.apache.axis2.context.ConfigurationContext getTenantConfigurationContext(String tenantDomain, org.apache.axis2.context.ConfigurationContext mainConfigCtx)
public static long getLastAccessed(String tenantDomain, org.apache.axis2.context.ConfigurationContext mainConfigCtx)
public static void setTenantAccessed(String tenantDomain, org.apache.axis2.context.ConfigurationContext mainConfigCtx)
public static org.apache.axis2.description.AxisService getAxisService(String url, org.apache.axis2.context.ConfigurationContext mainConfigContext) throws org.apache.axis2.AxisFault
url
- will have pattern mainConfigContext
- The main ConfigurationContext from the serverorg.apache.axis2.AxisFault
- If an error occurs while retrieving the AxisServicepublic static Map<String,org.apache.axis2.context.ConfigurationContext> getTenantConfigurationContexts(org.apache.axis2.context.ConfigurationContext mainConfigCtx)
mainConfigCtx
- Super-tenant Axis2 ConfigurationContextpublic static void initializeTenantTransports(org.apache.axis2.context.ConfigurationContext mainConfigCtx) throws org.apache.axis2.AxisFault
mainConfigCtx
- The main config contextorg.apache.axis2.AxisFault
- If an error occurs while initializing tenant transportspublic static void setTenantTransports(org.apache.axis2.engine.AxisConfiguration mainAxisConfig, String tenantDomain, org.apache.axis2.engine.AxisConfiguration tenantAxisConfig) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault
public static List<org.wso2.carbon.user.core.tenant.Tenant> getActiveTenants(org.apache.axis2.context.ConfigurationContext mainConfigCtx) throws Exception
mainConfigCtx
- The main super-tenant ConfigurationContextException
- If an error occurs while retrieving tenantspublic static void cleanupTenants(long tenantIdleTimeMillis)
tenantIdleTimeMillis
tenantIdleTimeMillis
- The maximum tenant idle time in millisecondspublic static String getTenantDomain(String url)
url
- - incoming URLpublic static void terminateTenantConfigContext(org.apache.axis2.context.ConfigurationContext tenantCfgCtx)
tenantCfgCtx
- The tenant ConfigurationContext which needs to be terminatedCopyright © 2016 WSO2 Inc. All rights reserved.