Class CoordinatorEngine

java.lang.Object
com.arjuna.wst11.messaging.engines.CoordinatorEngine
All Implemented Interfaces:
com.arjuna.webservices11.wsat.CoordinatorInboundEvents

public class CoordinatorEngine extends Object implements com.arjuna.webservices11.wsat.CoordinatorInboundEvents
The coordinator state engine
Author:
kevin
  • Constructor Summary

    Constructors
    Constructor
    Description
    CoordinatorEngine(String id, boolean durable, jakarta.xml.ws.wsaddressing.W3CEndpointReference participant)
    Construct the initial engine for the coordinator.
    CoordinatorEngine(String id, boolean durable, jakarta.xml.ws.wsaddressing.W3CEndpointReference participant, boolean recovered, com.arjuna.webservices11.wsat.State state)
    Construct the engine for the coordinator in a specified state.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    aborted(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification aborted, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
    Handle the aborted event.
    com.arjuna.webservices11.wsat.State
    Handle the commit event.
    void
    committed(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification committed, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
    Handle the committed event.
    Get the coordinator id.
    jakarta.xml.ws.wsaddressing.W3CEndpointReference
    Get the participant endpoint reference
    com.arjuna.webservices11.wsat.State
    Retrieve the current state of this participant
    boolean
    Is the participant durable?
    boolean
    Was this a read only response?
    boolean
    Is the participant recovered?
    com.arjuna.webservices11.wsat.State
    Handle the prepare event.
    void
    prepared(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification prepared, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
    Handle the prepared event.
    void
    readOnly(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification readOnly, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
    Handle the readOnly event.
    com.arjuna.webservices11.wsat.State
    Handle the rollback event.
    void
    soapFault(com.arjuna.webservices.SoapFault soapFault, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
    Handle the soap fault event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CoordinatorEngine

      public CoordinatorEngine(String id, boolean durable, jakarta.xml.ws.wsaddressing.W3CEndpointReference participant)
      Construct the initial engine for the coordinator.
      Parameters:
      id - The coordinator id.
      durable - true if the participant is durable, false if volatile.
      participant - The participant endpoint reference.
    • CoordinatorEngine

      public CoordinatorEngine(String id, boolean durable, jakarta.xml.ws.wsaddressing.W3CEndpointReference participant, boolean recovered, com.arjuna.webservices11.wsat.State state)
      Construct the engine for the coordinator in a specified state.
      Parameters:
      id - The coordinator id.
      durable - true if the participant is durable, false if volatile.
      participant - The participant endpoint reference.
      state - The initial state.
  • Method Details

    • aborted

      public void aborted(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification aborted, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
      Handle the aborted event.
      Specified by:
      aborted in interface com.arjuna.webservices11.wsat.CoordinatorInboundEvents
      Parameters:
      aborted - The aborted notification.
      map - The addressing context.
      arjunaContext - The arjuna context. None -> None (ignore) Active -> Aborting (forget) Preparing -> Aborting (forget) PreparedSuccess -> PreparedSuccess (invalid state) Committing -> Committing (invalid state) Aborting -> Aborting (forget)
    • committed

      public void committed(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification committed, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
      Handle the committed event.
      Specified by:
      committed in interface com.arjuna.webservices11.wsat.CoordinatorInboundEvents
      Parameters:
      committed - The committed notification.
      map - The addressing context.
      arjunaContext - The arjuna context. None -> None (ignore) Active -> Aborting (invalid state) Preparing -> Aborting (invalid state) PreparedSuccess -> PreparedSuccess (invalid state) Committing -> Committing (forget) Aborting -> Aborting (invalid state)
    • prepared

      public void prepared(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification prepared, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
      Handle the prepared event.
      Specified by:
      prepared in interface com.arjuna.webservices11.wsat.CoordinatorInboundEvents
      Parameters:
      prepared - The prepared notification.
      map - The addressing context.
      arjunaContext - The arjuna context. None -> Durable: (send rollback), Volatile: Invalid state: none Active -> Aborting (invalid state) Preparing -> PreparedSuccess (Record Vote) PreparedSuccess -> PreparedSuccess (ignore) Committing -> Committing (resend Commit) Aborting -> Aborting (resend Rollback and forget)
    • readOnly

      public void readOnly(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification readOnly, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
      Handle the readOnly event.
      Specified by:
      readOnly in interface com.arjuna.webservices11.wsat.CoordinatorInboundEvents
      Parameters:
      readOnly - The readOnly notification.
      map - The addressing context.
      arjunaContext - The arjuna context. None -> None (ignore) Active -> Active (forget) Preparing -> Preparing (forget) PreparedSuccess -> PreparedSuccess (invalid state) Committing -> Committing (invalid state) Aborting -> Aborting (forget)
    • soapFault

      public void soapFault(com.arjuna.webservices.SoapFault soapFault, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
      Handle the soap fault event.
      Specified by:
      soapFault in interface com.arjuna.webservices11.wsat.CoordinatorInboundEvents
      Parameters:
      soapFault - The soap fault.
      map - The addressing context.
      arjunaContext - The arjuna context.
    • prepare

      public com.arjuna.webservices11.wsat.State prepare()
      Handle the prepare event. None -> None (invalid state) Active -> Preparing (send prepare) Preparing -> Preparing (resend prepare) PreparedSuccess -> PreparedSuccess (do nothing) Committing -> Committing (invalid state) Aborting -> Aborting (invalid state)
    • commit

      public com.arjuna.webservices11.wsat.State commit()
      Handle the commit event. None -> None (invalid state) Active -> Active (invalid state) Preparing -> Preparing (invalid state) PreparedSuccess -> Committing (send commit) Committing -> Committing (resend commit) Aborting -> Aborting (invalid state)
    • rollback

      public com.arjuna.webservices11.wsat.State rollback()
      Handle the rollback event. None -> None (invalid state) Active -> Aborting (send rollback) Preparing -> Aborting (send rollback) PreparedSuccess -> Aborting (send rollback) Committing -> Committing (invalid state) Aborting -> Aborting (do nothing)
    • getId

      public String getId()
      Get the coordinator id.
      Returns:
      The coordinator id.
    • getParticipant

      public jakarta.xml.ws.wsaddressing.W3CEndpointReference getParticipant()
      Get the participant endpoint reference
      Specified by:
      getParticipant in interface com.arjuna.webservices11.wsat.CoordinatorInboundEvents
      Returns:
      The participant endpoint reference
    • isDurable

      public boolean isDurable()
      Is the participant durable?
      Returns:
      true if durable, false otherwise.
    • isRecovered

      public boolean isRecovered()
      Is the participant recovered?
      Returns:
      true if recovered, false otherwise.
    • isReadOnly

      public boolean isReadOnly()
      Was this a read only response?
      Returns:
      true if a read only response, false otherwise.
    • getState

      public com.arjuna.webservices11.wsat.State getState()
      Retrieve the current state of this participant
      Returns:
      the current state.