public final class CarbonContextHolderBase extends Object
| Constructor and Description |
|---|
CarbonContextHolderBase(CarbonContextHolderBase carbonContextHolder)
Constructor that can be used to create clones.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
destroyCurrentCarbonContextHolder()
This method will destroy the current CarbonContext holder.
|
void |
endTenantFlow()
This will end the tenant flow and restore the previous CarbonContext.
|
static CarbonContextHolderBase |
getCurrentCarbonContextHolderBase()
Method to obtain the current carbon context holder's base.
|
static DiscoveryService |
getDiscoveryServiceProvider()
Method to obtain an instance to the Discovery Service.
|
Object |
getProperty(String name)
Method to obtain a property on this CarbonContext instance.
|
String |
getTenantDomain()
Method to obtain the tenant domain on this CarbonContext instance.
|
int |
getTenantId()
Method to obtain the tenant id on this CarbonContext instance.
|
String |
getUsername()
Method to obtain the username on this CarbonContext instance.
|
static void |
registerUnloadTenantTask(UnloadTenantTask unloadTenantTask)
Method to register a task that will be executed when a tenant is
unloaded.
|
static void |
setDiscoveryServiceProvider(DiscoveryService discoveryServiceProvider)
Method to define the instance of the Discovery Service.
|
void |
setProperty(String name,
Object value)
Method to set a property on this CarbonContext instance.
|
void |
setTenantDomain(String domain)
Method to set the tenant domain on this CarbonContext instance.
|
void |
setTenantId(int tenantId)
Method to set the tenant id on this CarbonContext instance.
|
void |
setUsername(String username)
Method to set the username on this CarbonContext instance.
|
void |
startTenantFlow()
Starts a tenant flow.
|
static void |
unloadTenant(int tenantId)
Method that will be called when a tenant is unloaded.
|
public CarbonContextHolderBase(CarbonContextHolderBase carbonContextHolder)
carbonContextHolder - the CarbonContext holder instance of which the clone will be
created from.public static DiscoveryService getDiscoveryServiceProvider()
public static void setDiscoveryServiceProvider(DiscoveryService discoveryServiceProvider)
discoveryServiceProvider - the Discovery Service instance.public static CarbonContextHolderBase getCurrentCarbonContextHolderBase()
public static void registerUnloadTenantTask(UnloadTenantTask unloadTenantTask)
unloadTenantTask - the task to run.UnloadTenantTaskpublic static void unloadTenant(int tenantId)
tenantId - the tenant's identifier.public void startTenantFlow()
public void endTenantFlow()
public int getTenantId()
public void setTenantId(int tenantId)
tenantId - the tenant id.public String getUsername()
public void setUsername(String username)
username - the username.public String getTenantDomain()
public void setTenantDomain(String domain)
tenantDomain - the tenant domain.public Object getProperty(String name)
name - the property name.public void setProperty(String name, Object value)
name - the property name.value - the value to be set to the property by the given name.public static void destroyCurrentCarbonContextHolder()
Copyright © 2015 WSO2 Inc. All rights reserved.