public interface RhinoActivityContextInterface extends ActivityContextInterface
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.
Modifier and Type | Method and 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.
|
attach, detach, equals, getActivity, hashCode, isAttached, isEnding
void suspendDelivery() throws IllegalStateException, TransactionRequiredLocalException, SLEEException
resumeDelivery
is invoked, or the system-dependent default timeout is reached, whichever occurs
first.
This method is a mandatory transactional method.
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.void suspendDelivery(int timeout) throws IllegalArgumentException, IllegalStateException, TransactionRequiredLocalException, SLEEException
resumeDelivery
is invoked, or the specified timeout is reached, whichever occurs first.
This method is a mandatory transactional method.
timeout
- the timeout period, measured in milliseconds, before event delivery
will be implicity resumed if resumeDelivery()
has not been invoked.IllegalArgumentException
- if timeout
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.void resumeDelivery() throws IllegalStateException, TransactionRequiredLocalException, SLEEException
This method is a mandatory transactional method.
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.boolean isSuspended() throws TransactionRequiredLocalException, SLEEException
true
if event delivery is currently suspended, false
otherwise.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.