This class encapsulates a coordinated activity.
Whenever a client (participant) registers for the activity, a
Registrant is constructed and managed by this class.
author: Ryan.Shoemaker@Sun.COM version: $Revision: 1.9 $ since: 1.0
Inner Class :static class ExpirationTask extends TimerTask
expirationGuard() Sub classes will implement this method to indicate whether or not they
are subject to expiration.
public void
expire() Release resources held by this coordinator.
This method will be automatically invoked once if the activity has a non-zero expiration.
During expiration, the coordinator will iterate over all of its registrants and tell them
to expire.
Construct a new Coordinator object from the specified context and soap request.
Parameters: context - The coordination context Parameters: request - The soap request
Construct a new Coordinator object from the specified context.
This constructor will be the main entry point for activity within the
AppServer.
Parameters: context - The coordination context
Add the specified Registrant to the list of registrants for this
coordinated activity.
Parameters: registrant - The Registrant Parameters: wsContext - the web service context of the incoming message or null if it isn't available
Sub classes will implement this method to indicate whether or not they
are subject to expiration.
true if the coordinator should NOT expire, false otherwise.
Release resources held by this coordinator.
This method will be automatically invoked once if the activity has a non-zero expiration.
During expiration, the coordinator will iterate over all of its registrants and tell them
to expire. Depending on their state, registrants will either expire or not. A coordinator
will not completely expire until all of its registrants have expired.
Get the
ActivityIdentifier object.
This object can be used when it is necessary to insert the id as
a ReferenceParameter in a soap message
The activity id object
Get the registrant with the specified id or null if it does not exist.
Parameters: id - the registrant id the Registrant object or null if the id does not exist
Get the SOAP request associated with this coordinated activity, if it
exists.
The original SOAP request (createCoordinationContext) or nullif it doesn't exist.
Return true iff this coordinator is delegating to a root coordinator
true iff this coordinator is delegating to a root coordinator
registerWithRootRegistrationService
public boolean registerWithRootRegistrationService(Registrant r)(Code)
Return true iff registrant should register with its root registration service.
Enables local participants to be cached with coordinator locally when this method returns
true.
Parameters: r - restistrant Return true iff registrant should register with its root registration service