Methods Summary |
---|
public abstract void | addRegistrant(Registrant registrant, javax.xml.ws.WebServiceContext wsContext)Add the specified Registrant to the list of registrants for this
coordinated activity.
|
public abstract boolean | 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. Depending on their state, registrants will either expire or not. A coordinator
will not completely expire until all of its registrants have expired.
expired = true;
if (logger.isLogging(Level.FINEST)) {
logger.finest("Coordinator.expire", "attempting to expire coordinator: " + id.getValue());
}
if (!expirationGuard()) {
if (logger.isLogging(Level.FINEST)) {
logger.finest("Coordinator.expire", "forgetting resources for: " + id.getValue());
}
// TODO: send fault S4.4 wscoor:NoActivity
forget();
} else {
if (logger.isLogging(Level.FINEST)) {
logger.finest("Coordinator.expire", "expiration was guarded, returning without expiration");
}
}
|
public void | forget()Release all resources associated with this coordinator
if (expirationTask != null){
expirationTask.cancel();
expirationTask = null;
}
CoordinationManager.getInstance().removeCoordinator(this.id.getValue());
|
public CoordinationContextInterface | getContext()Get the coordination context associated with this coordinated activity
return context;
|
public abstract javax.xml.ws.EndpointReference | getCoordinatorProtocolServiceForRegistrant(Registrant r)Return the Coordinator Protocol Service EPR for registrant r.
|
public long | getExpires()Get the expiration value
return context.getExpires();
|
public com.sun.xml.ws.tx.common.Identifier | getId()Get the {@link ActivityIdentifier} object.
This object can be used when it is necessary to insert the id as
a ReferenceParameter in a soap message
return id;
|
public java.lang.String | getIdValue()Get the activity id value
return id.getValue();
|
public abstract Registrant | getRegistrant(java.lang.String id)Get the registrant with the specified id or null if it does not exist.
|
public abstract java.util.List | getRegistrants()Get the list of {@link Registrant}s for this coordinated activity.
The returned list is unmodifiable (read-only). Add new Registrants
with the {@link #addRegistrant(Registrant,WebServiceContext)} api instead.
|
public com.sun.xml.ws.tx.webservice.member.coord.CreateCoordinationContextType | getRequest()Get the SOAP request associated with this coordinated activity, if it
exists.
return request;
|
public boolean | isExpired()
return expired;
|
public boolean | isSubordinate()Return true iff this coordinator is delegating to a root coordinator
return context.getRootRegistrationService() != null;
|
public boolean | registerWithRootRegistrationService(Registrant r)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.
return false;
|
public abstract void | removeRegistrant(java.lang.String id)Remove the registrant with the specified id
|
public void | setExpired(boolean expired)
this.expired = expired;
|
public void | setExpires(long i)
if (context != null) {
context.setExpires(i);
}
|