org.objectweb.jotm.btp.roles
Class Inferior

java.lang.Object
  |
  +--org.objectweb.jotm.btp.axis.WebService
        |
        +--org.objectweb.jotm.btp.roles.Actor
              |
              +--org.objectweb.jotm.btp.roles.Inferior
All Implemented Interfaces:
BtpResource
Direct Known Subclasses:
Participant

public abstract class Inferior
extends Actor
implements BtpResource


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
protected Inferior(org.apache.log4j.Category logger)
           
 
Method Summary
 String applicationMessage(String transactionid, XElement message)
           
 boolean cancel(String transactionid)
           
 boolean confirm(String transactionid, boolean onephase)
           
 void contradiction(String transactionid)
           
 void deregisterResource(String transactionid)
           
protected  boolean doEnrol(Context context)
           
 void enrolled(String transactionid)
           
protected  BtpResource getResource(String transactionid)
           
protected  boolean isEnrolled(String trid)
           
protected  String onApplicationMessage(String transactionid, XElement message)
           
protected  BtpMessage onCancel(Cancel msg)
           
protected  BtpMessage onConfirm(Confirm msg)
           
protected  BtpMessage onConfirmOnePhase(ConfirmOnePhase msg)
           
protected  BtpMessage onContext(Context context)
           
abstract  String onMessage(String xml)
           
protected  BtpMessage onPrepare(Prepare msg)
           
protected  BtpMessage onRelatedGroup(RelatedGroup msg)
           
protected  BtpMessage onRequestStatus(RequestStatus msg)
           
protected  BtpMessage onSuperiorState(SuperiorState msg)
           
 int prepare(String transactionid)
           
 void registerResource(String transactionid, BtpResource r)
           
protected  BtpMessage reportFault(String text)
           
 String unknownMessage(BtpMessage m)
           
 
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

Inferior

protected Inferior(org.apache.log4j.Category logger)
Method Detail

onRelatedGroup

protected BtpMessage onRelatedGroup(RelatedGroup msg)

onContext

protected BtpMessage onContext(Context context)

isEnrolled

protected boolean isEnrolled(String trid)

doEnrol

protected boolean doEnrol(Context context)

onConfirmOnePhase

protected BtpMessage onConfirmOnePhase(ConfirmOnePhase msg)

onConfirm

protected BtpMessage onConfirm(Confirm msg)

onCancel

protected BtpMessage onCancel(Cancel msg)

onPrepare

protected BtpMessage onPrepare(Prepare msg)

onApplicationMessage

protected String onApplicationMessage(String transactionid,
                                      XElement message)

onRequestStatus

protected BtpMessage onRequestStatus(RequestStatus msg)

onSuperiorState

protected BtpMessage onSuperiorState(SuperiorState msg)

unknownMessage

public String unknownMessage(BtpMessage m)

reportFault

protected BtpMessage reportFault(String text)

getResource

protected BtpResource getResource(String transactionid)

registerResource

public void registerResource(String transactionid,
                             BtpResource r)

deregisterResource

public void deregisterResource(String transactionid)

enrolled

public void enrolled(String transactionid)
Specified by:
enrolled in interface BtpResource
Parameters:
transactionid - The transaction ID

prepare

public int prepare(String transactionid)
Specified by:
prepare in interface BtpResource
Parameters:
transactionid - The transaction ID

confirm

public boolean confirm(String transactionid,
                       boolean onephase)
                throws Exception
Specified by:
confirm in interface BtpResource
Parameters:
transactionid - The transaction ID
onephase - true when 1-phase commit, false when 2-phase commit.
Exception

cancel

public boolean cancel(String transactionid)
               throws Exception
Specified by:
cancel in interface BtpResource
Parameters:
transactionid - The transaction ID
Exception

contradiction

public void contradiction(String transactionid)
Specified by:
contradiction in interface BtpResource
Parameters:
transactionid - The transaction ID

applicationMessage

public String applicationMessage(String transactionid,
                                 XElement message)
Specified by:
applicationMessage in interface BtpResource
Parameters:
transactionid - The transaction ID
message - The application message

onMessage

public abstract String onMessage(String xml)
Specified by:
onMessage in class Actor