@Library(id=@ComponentId(name="SessionOwnership",vendor="OpenCloud",version="1.0")) @ResourceAdaptorType(id=@ComponentId(name="SessionOwnership",vendor="OpenCloud",version="1.0"),libraryRefs=@LibraryReference(library=@ComponentId(name="SessionOwnership",vendor="OpenCloud",version="1.0")),eventTypeRefs={@EventTypeReference(eventType=@ComponentId(name="com.opencloud.rhino.resources.sessionownership.SessionOwnershipReadResultEvent",vendor="OpenCloud",version="1.0")),@EventTypeReference(eventType=@ComponentId(name="com.opencloud.rhino.resources.sessionownership.SessionOwnershipWriteResultEvent",vendor="OpenCloud",version="1.0"))},raTypeClasses=@ResourceAdaptorTypeClasses(activityTypes=@ActivityType(activityTypeName="com.opencloud.rhino.resources.sessionownership.SessionOwnershipActivity"),acInterfaceFactoryInterface=@ActivityContextInterfaceFactoryInterface(aciFactoryInterfaceName="com.opencloud.rhino.resources.sessionownership.SessionOwnershipActivityContextInterfaceFactory"),resourceAdaptorInterface=@ResourceAdaptorInterface(resourceAdaptorInterfaceName="com.opencloud.rhino.resources.sessionownership.SessionOwnershipProvider"))) public interface SessionOwnershipProvider
Resource adaptor interface for the Session Ownership resource adaptor type.
This resource adaptor type provides an SBB interface to the SessionOwnershipFacility
.
Modifier and Type | Field and Description |
---|---|
static String |
JNDI_NAME
Constant declaring the JNDI name where a
SessionOwnershipProvider object is bound into the JNDI environment of SBBs and SBB parts. |
Modifier and Type | Method and Description |
---|---|
SessionOwnershipActivity |
createSessionOwnershipActivity()
Create a new session ownership activity.
|
long |
getDefaultTTL()
Get the default time-to-live for records stored in this session ownership resource adaptor.
|
boolean |
isAvailable()
Determine whether or not session ownership functionality is actually available in the namespace where the calling SBB or SBB part is deployed.
|
SessionOwnershipRecord |
peekRecord(String primaryKey)
Retrieve a locally cached copy of the session ownership record for the specified primary key.
|
Set<SessionOwnershipRecord> |
peekRecordsByAdditionalKey(String additionalKey)
Retrieve locally cached copies of session ownership records with the specified additional key.
|
static final String JNDI_NAME
Constant declaring the JNDI name where a SessionOwnershipProvider
object is bound into the JNDI environment of SBBs and SBB parts.
The Session Ownership Resource Adaptor Type implementation is provided internally within Rhino, thus it cannot be referenced by SBBs and SBB parts using a normal resource adaptor entity link binding. Instead, an implementation of this interface is made available at this fixed JNDI location.
The value of this constant is "java:comp/env/rhino/sessionownership/provider".
boolean isAvailable()
Determine whether or not session ownership functionality is actually available in the namespace where the calling SBB or SBB part is deployed.
Other methods in this interface are only usable if this method returns true
.
true
if session ownership functionality is available to the caller, false
otherwise.SessionOwnershipActivity createSessionOwnershipActivity() throws IllegalStateException
Create a new session ownership activity. The activity will be started in the SLEE before this method returns so that an SBB may attach to it.
IllegalStateException
- if session ownership functionality isn’t available in the namespace the SBB is deployed in.SessionOwnershipRecord peekRecord(String primaryKey) throws IllegalStateException
Retrieve a locally cached copy of the session ownership record for the specified primary key. A record will only be returned if it is present in the cache, ie. remote backend lookup are not performed.
primaryKey
- the primary key of the record to retrieve.IllegalStateException
- if session ownership functionality isn’t available in the namespace the SBB is deployed in.Set<SessionOwnershipRecord> peekRecordsByAdditionalKey(String additionalKey) throws IllegalStateException
Retrieve locally cached copies of session ownership records with the specified additional key. Only records present in the cache will be included in the result, ie. remote backend lookups are not performed.
additionalKey
- the additional key of the records to retrieve.IllegalStateException
- if session ownership functionality isn’t available in the namespace the SBB is deployed in.long getDefaultTTL() throws IllegalStateException
Get the default time-to-live for records stored in this session ownership resource adaptor. Units are in milliseconds.
IllegalStateException
- if session ownership functionality isn’t available in the namespace the SBB is deployed in.