|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.objectweb.jotm.btp.axis.WebService
|
+--org.objectweb.jotm.btp.roles.Actor
|
+--org.objectweb.jotm.btp.roles.Superior
Superior object is the top level of the Superior tree. It extends the Actor object to have utilities methods. This object implements the following methods:
- cancelled
- contextReply
- enrol
- prepareInferiors
- fault
- redirect
- confirmed
- requestStatus
- resign
- status
This object is extended by the Node and Decider objects.
| Field Summary |
| Fields inherited from class org.objectweb.jotm.btp.axis.WebService |
url_ |
| Fields inherited from interface org.objectweb.jotm.btp.roles.BtpResource |
VOTE_CANCELLED, VOTE_PREPARED, VOTE_WRONG_STATE |
| Constructor Summary | |
Superior()
|
|
| Method Summary | |
String |
applicationMessage(BtpMessage m)
|
String |
applicationMessage(String transactionid,
XElement message)
|
boolean |
cancel(String transactionid)
|
BtpMessage |
cancelled(Cancelled msg)
|
boolean |
confirm(String transactionid,
boolean onephase)
|
BtpMessage |
confirmed(Confirmed msg)
This message is not received directly but received by the Decider in the confirmTransaction method. |
BtpMessage |
contextReply(ContextReply msg)
|
void |
contradiction(String transactionid)
|
BtpMessage |
enrol(Enrol msg)
enrols a web service into a given transaction. |
void |
enrolled(String transactionid)
|
BtpMessage |
fault(Fault msg)
tbd |
protected Vector |
getInferiorsList(String transactionid)
|
protected Vector |
listTransactions()
|
abstract String |
onMessage(String xml)
|
int |
prepare(String transactionid)
|
BtpMessage |
prepareInferiors(PrepareInferiors msg)
prepares all the inferiors from a given object. |
BtpMessage |
redirect(Redirect msg)
tbd |
BtpMessage |
reportFault(String text)
reports a Fault message with a single text message |
BtpMessage |
reportUnknownTransaction(String txid)
|
BtpMessage |
requestInferiorStatuses(RequestInferiorStatuses msg)
Possible returned messages: InferiorStatuses, Fault |
BtpMessage |
requestStatus(RequestStatus msg)
requests a status to this decider/superior If the target address is itself, then reply the status. |
BtpMessage |
resign(Resign msg)
sent from an enrolled inferior to the Superior to remove the inferior from the enrolment. |
BtpMessage |
status(Status msg)
|
| Methods inherited from class org.objectweb.jotm.btp.roles.Actor |
getLastIncoming, getLastIncoming, getLastOutgoing, getLastOutgoing, getRecentIncoming, getRecentOutgoing, logger, logIncoming, logIncoming, logOutgoing, logOutgoing, messages |
| Methods inherited from class org.objectweb.jotm.btp.axis.WebService |
buildURI, buildURI, getTransactionIdentifierFromUri, getUrl, getUrlFromUri, getWsddParameter, isLocalUri |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Superior()
| Method Detail |
public abstract String onMessage(String xml)
onMessage in class Actorpublic String applicationMessage(BtpMessage m)
public BtpMessage cancelled(Cancelled msg)
public BtpMessage contextReply(ContextReply msg)
public BtpMessage enrol(Enrol msg)
msg - the received Enrol message
public BtpMessage prepareInferiors(PrepareInferiors msg)
msg - the received PrepareInferiors message
public BtpMessage reportFault(String text)
text - a free text to explain the problem
public BtpMessage reportUnknownTransaction(String txid)
public BtpMessage fault(Fault msg)
public BtpMessage redirect(Redirect msg)
public BtpMessage confirmed(Confirmed msg)
public BtpMessage requestInferiorStatuses(RequestInferiorStatuses msg)
msg - the RequestInferiorStatuses message to answer
public BtpMessage requestStatus(RequestStatus msg)
msg - the RequestStatus message to answer
public BtpMessage resign(Resign msg)
msg - a Resign message
public BtpMessage status(Status msg)
public void enrolled(String transactionid)
enrolled in interface BtpResourcetransactionid - The transaction IDpublic int prepare(String transactionid)
prepare in interface BtpResourcetransactionid - The transaction ID
public boolean confirm(String transactionid,
boolean onephase)
throws Exception
confirm in interface BtpResourcetransactionid - The transaction IDonephase - true when 1-phase commit, false when 2-phase commit.
Exception
public boolean cancel(String transactionid)
throws Exception
cancel in interface BtpResourcetransactionid - The transaction ID
Exceptionpublic void contradiction(String transactionid)
contradiction in interface BtpResourcetransactionid - The transaction ID
public String applicationMessage(String transactionid,
XElement message)
applicationMessage in interface BtpResourcetransactionid - The transaction IDmessage - The application messageprotected Vector getInferiorsList(String transactionid)
protected Vector listTransactions()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||