Interface RhinoActivityContextInterface
-
- All Superinterfaces:
ActivityContextInterface
public interface RhinoActivityContextInterface extends ActivityContextInterface
An extension of the JAIN SLEE-defined interface that provides access to Rhino-specific features.
All
ActivityContextInterface
objects that Rhino provides to an SBB will implement this extension interface, therefore a typecast to this interface will always succeed. Furthermore, Rhino will recognise an event handler method defined with this type (instead of the standard interface type) as the second method argument, removing the need to perform a typecast within the method body.An SBB or SBB Part Activity Context Interface may be declared as extending this interface rather than the standard interface if desired.
- Since:
- Rhino 2.4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isSuspended()
Determine if event delivery has been suspended on this Activity Context.void
resumeDelivery()
Resume previously suspended delivery of events on this Activity Context.void
suspendDelivery()
Suspend further delivery of events on this Activity Context.void
suspendDelivery(int timeout)
Suspend further delivery of events on this Activity Context.-
Methods inherited from interface javax.slee.ActivityContextInterface
attach, detach, equals, getActivity, hashCode, isAttached, isEnding
-
-
-
-
Method Detail
-
suspendDelivery
void suspendDelivery() throws IllegalStateException, TransactionRequiredLocalException, SLEEException
Suspend further delivery of events on this Activity Context. No further SBBs will receive events that occur on the underlying activity until
resumeDelivery
is invoked, or the system-dependent default timeout is reached, whichever occurs first.This method is a mandatory transactional method.
- Throws:
IllegalStateException
- if event delivery has already been suspended.TransactionRequiredLocalException
- if this method is invoked without a valid transaction context.SLEEException
- if event delivery could not be suspended due to a system-level failure.- Since:
- Rhino 2.4.0
-
suspendDelivery
void suspendDelivery(int timeout) throws IllegalArgumentException, IllegalStateException, TransactionRequiredLocalException, SLEEException
Suspend further delivery of events on this Activity Context. No further SBBs will receive events that occur on the underlying activity until
resumeDelivery
is invoked, or the specified timeout is reached, whichever occurs first.This method is a mandatory transactional method.
- Parameters:
timeout
- the timeout period, measured in milliseconds, before event delivery will be implicity resumed ifresumeDelivery()
has not been invoked.- Throws:
IllegalArgumentException
- iftimeout
is equal to or less than zero.IllegalStateException
- if event delivery has already been suspended.TransactionRequiredLocalException
- if this method is invoked without a valid transaction context.SLEEException
- if event delivery could not be suspended due to a system-level failure.- Since:
- Rhino 2.4.0
-
resumeDelivery
void resumeDelivery() throws IllegalStateException, TransactionRequiredLocalException, SLEEException
Resume previously suspended delivery of events on this Activity Context.
This method is a mandatory transactional method.
- Throws:
IllegalStateException
- if event delivery has not been suspended.TransactionRequiredLocalException
- if this method is invoked without a valid transaction context.SLEEException
- if event delivery could not be resumed due to a system-level failure.- Since:
- Rhino 2.4.0
-
isSuspended
boolean isSuspended() throws TransactionRequiredLocalException, SLEEException
Determine if event delivery has been suspended on this Activity Context.
- Returns:
true
if event delivery is currently suspended,false
otherwise.- Throws:
TransactionRequiredLocalException
- if this method is invoked without a valid transaction context.SLEEException
- if the status of event delivery could not be determined due to a system-level failure.- Since:
- Rhino 2.4.0
-
-