|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TenantContext
TenantContext
interface provides information about the tenant which is associated with the current
Thread
.
Method Summary | ||
---|---|---|
|
execute(String id,
Callable<V> callable)
This method will execute callable.call() method on behalf of the specified tenant and will return the result of the called method. |
|
String |
getAccountName()
Deprecated. replaced by Account.getId() |
|
Collection<Tenant> |
getSubscribedTenants()
|
|
Tenant |
getTenant()
Returns the Tenant associated with the current Thread . |
|
String |
getTenantId()
Deprecated. replaced by Tenant.getId() |
Method Detail |
---|
@Deprecated String getTenantId()
Tenant.getId()
Thread
.
TenantUnavailableException
- when there is no tenant context associated with the current Thread
.@Deprecated String getAccountName()
Account.getId()
Thread
.
TenantUnavailableException
- when there is no tenant context associated with the current Thread
.Tenant getTenant()
Tenant
associated with the current Thread
.
Tenant
.
TenantUnavailableException
- when there is no tenant associated with the current thread or the current VM is not started for a
particular tenant.Collection<Tenant> getSubscribedTenants()
<V> V execute(String id, Callable<V> callable) throws TenantAlreadySetException, InvalidTenantException, Exception
id
- the tenant Idcallable
- an instance on which call() method will be executed.
TenantAlreadySetException
- if called in a request-handling thread. In this case the tenant has already been extracted and set by
the tenant valve so it's illegal to change it. Or if this method is called as nested execution of
behalf of another tenant.
InvalidTenantException
- if there is no tenant with the given id, or if the tenant with the given id is not subscribed to the
application or if the tenant id passed does not correspond to the tenant for which the current VM has
been started.
Exception
- any exception thrown during execution of callable.call() method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |