public interface SleeAdaptor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME
The
ServletContext attribute name which may be used to
lookup the SleeAdaptor instance for the
current servlet application |
Modifier and Type | Method and Description |
---|---|
void |
attach(javax.slee.ActivityContextInterface aci)
Attach the current
SipApplicationSession to the
ActivityContextInterface of an activity created by another
Resource Adaptor. |
void |
detach(javax.slee.ActivityContextInterface aci)
Detaches the current
SipApplicationSession from the
ActivityContextInterface of an activity created by another
Resource Adaptor. |
java.util.List<javax.slee.ActivityContextInterface> |
getAttachedActivities()
Returns an immutable list of the activities currently attached to the current
SipApplicationSession . |
javax.slee.facilities.Tracer |
getTracer(java.lang.String tracerName)
Get a
Tracer for the given tracer name. |
void |
reassignActivity(javax.slee.ActivityContextInterface aci,
javax.servlet.sip.SipApplicationSession newOwner)
Reassigns processing of a SLEE activity to another servlet application instance.
|
static final java.lang.String NAME
ServletContext
attribute name which may be used to
lookup the SleeAdaptor
instance for the
current servlet applicationjavax.slee.facilities.Tracer getTracer(java.lang.String tracerName)
Tracer
for the given tracer name.tracerName
- the name of the tracer.SbbContext.getTracer(String)
void attach(javax.slee.ActivityContextInterface aci)
SipApplicationSession
to the
ActivityContextInterface
of an activity created by another
Resource Adaptor. The SipApplicationSession
will receive
all events fired on the ACI.
Servlet applications should call this method after creating an activity from
another Resource Adaptor, to ensure that subsequent events on the activity are
processed by the same application instance.aci
- the ActivityContextInterface
for a SLEE activity.void detach(javax.slee.ActivityContextInterface aci)
SipApplicationSession
from the
ActivityContextInterface
of an activity created by another
Resource Adaptor. The SipApplicationSession
will no
longer receive events fired on the ACI.aci
- the ActivityContextInterface
for a SLEE activity.java.util.List<javax.slee.ActivityContextInterface> getAttachedActivities()
SipApplicationSession
.SbbContext.getActivities()
void reassignActivity(javax.slee.ActivityContextInterface aci, javax.servlet.sip.SipApplicationSession newOwner)
Applications should use this method when they have received an event fired on an
activity from another SLEE Resource Adaptor, and they have determined that another
application instance should be responsible for handling that activity. The other
application instance is identified by its SipApplicationSession
,
which may have been obtained from SipSessionsUtil
or
other means.
If the event currently being processed was fired by the activity, then the other application instance will receive the same event. Therefore the current application instance should avoid mutating any shared state related to the event after reassigning it.
The current application instance is automatically detached and will not receive any more events from the activity.
NOTE: Only activities from other RAs may be reassigned. Attempting to
reassign SIP Servlet activities (SipApplicationSession
or
SipSession
) will result in an exception.
aci
- the ActivityContextInterface
for the SLEE activity.newOwner
- the SipApplicationSession
of the other
application instance that will now be responsible for handling events
from the activity.java.lang.IllegalArgumentException
- if aci is the ACI of a
SipApplicationSession
or
SipSession
.