org.objectweb.jotm.btp.samples
Class SampleWebService

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

public class SampleWebService
extends Participant


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
SampleWebService()
           
 
Method Summary
 String applicationMessage(String transactionid, XElement message)
           
 boolean cancel(String transactionid)
           
 boolean confirm(String transactionid)
           
 void contradiction(String transactionid)
           
 void enrolled(String transactionid)
           
 int prepare(String transactionid)
           
 
Methods inherited from class org.objectweb.jotm.btp.roles.Participant
onMessage
 
Methods inherited from class org.objectweb.jotm.btp.roles.Inferior
confirm, deregisterResource, doEnrol, getResource, isEnrolled, onApplicationMessage, onCancel, onConfirm, onConfirmOnePhase, onContext, onPrepare, onRelatedGroup, onRequestStatus, onSuperiorState, registerResource, reportFault, unknownMessage
 
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

SampleWebService

public SampleWebService()
Method Detail

enrolled

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

prepare

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

confirm

public boolean confirm(String transactionid)
                throws Exception
Parameters:
transactionid - The transaction ID
Exception

cancel

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

contradiction

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

applicationMessage

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