com.arjuna.wst.messaging.engines
Class CoordinatorCompletionCoordinatorEngine

java.lang.Object
  extended bycom.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngine
All Implemented Interfaces:
com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents

public class CoordinatorCompletionCoordinatorEngine
extends java.lang.Object
implements com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents

The coordinator completion coordinator state engine

Author:
kevin

Constructor Summary
CoordinatorCompletionCoordinatorEngine(java.lang.String id, com.arjuna.webservices.wsaddr.EndpointReferenceType participant)
          Construct the initial engine for the coordinator.
CoordinatorCompletionCoordinatorEngine(java.lang.String id, com.arjuna.webservices.wsaddr.EndpointReferenceType participant, com.arjuna.webservices.wsba.State state)
          Construct the engine for the coordinator in a specified state.
 
Method Summary
 com.arjuna.webservices.wsba.State cancel()
          Handle the cancel event.
 void cancelled(com.arjuna.webservices.wsba.NotificationType cancelled, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the cancelled event.
 com.arjuna.webservices.wsba.State close()
          Handle the close event.
 void closed(com.arjuna.webservices.wsba.NotificationType closed, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the closed event.
 com.arjuna.webservices.wsba.State compensate()
          Handle the compensate event.
 void compensated(com.arjuna.webservices.wsba.NotificationType compensated, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the compensated event.
 com.arjuna.webservices.wsba.State complete()
          Handle the complete event.
 void completed(com.arjuna.webservices.wsba.NotificationType completed, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the completed event.
 void exit(com.arjuna.webservices.wsba.NotificationType exit, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the exit event.
 void fault(com.arjuna.webservices.wsba.ExceptionType fault, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the fault event.
 BAParticipantManager getCoordinator()
          Get the associated coordinator.
 java.lang.String getId()
          Get the coordinator id.
 com.arjuna.webservices.wsaddr.EndpointReferenceType getParticipant()
          Get the participant endpoint reference
 com.arjuna.webservices.wsba.State getStatus()
          Handle the get status event.
 void getStatus(com.arjuna.webservices.wsba.NotificationType getStatus, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the getStatus event.
 void setCoordinator(BAParticipantManager coordinator)
          Set the coordinator and register
 void soapFault(com.arjuna.webservices.SoapFault soapFault, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the soap fault event.
 void status(com.arjuna.webservices.wsba.StatusType status, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the status event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordinatorCompletionCoordinatorEngine

public CoordinatorCompletionCoordinatorEngine(java.lang.String id,
                                              com.arjuna.webservices.wsaddr.EndpointReferenceType participant)
Construct the initial engine for the coordinator.

Parameters:
id - The coordinator id.
participant - The participant endpoint reference.

CoordinatorCompletionCoordinatorEngine

public CoordinatorCompletionCoordinatorEngine(java.lang.String id,
                                              com.arjuna.webservices.wsaddr.EndpointReferenceType participant,
                                              com.arjuna.webservices.wsba.State state)
Construct the engine for the coordinator in a specified state.

Parameters:
id - The coordinator id.
participant - The participant endpoint reference.
state - The initial state.
Method Detail

setCoordinator

public void setCoordinator(BAParticipantManager coordinator)
Set the coordinator and register

Parameters:
coordinator -

cancelled

public void cancelled(com.arjuna.webservices.wsba.NotificationType cancelled,
                      com.arjuna.webservices.wsaddr.AddressingContext addressingContext,
                      com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
Handle the cancelled event.

Specified by:
cancelled in interface com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents
Parameters:
cancelled - The cancelled notification.
addressingContext - The addressing context.
arjunaContext - The arjuna context. Active -> Active (invalid state) Canceling -> Ended Canceling-Active -> Canceling-Completing -> Completing -> Canceling-Active -> Ended Canceling-Completing -> Ended Completing -> Completing (invalid state) Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Compensating (invalid state) Faulting -> Faulting (invalid state) Faulting-Active -> Faulting (invalid state) Faulting-Compensating ->Faulting (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended

closed

public void closed(com.arjuna.webservices.wsba.NotificationType closed,
                   com.arjuna.webservices.wsaddr.AddressingContext addressingContext,
                   com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
Handle the closed event.

Specified by:
closed in interface com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents
Parameters:
closed - The closed notification.
addressingContext - The addressing context.
arjunaContext - The arjuna context. Active -> Active (invalid state) Canceling -> Canceling (invalid state) Canceling-Active -> Canceling (invalid state) Canceling-Completing -> Canceling (invalid state) Completing -> Completing (invalid state) Completed -> Completed (invalid state) Closing -> Ended Compensating -> Compensating (invalid state) Faulting -> Faulting (invalid state) Faulting-Active -> Faulting (invalid state) Faulting-Compensating -> Faulting (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended

compensated

public void compensated(com.arjuna.webservices.wsba.NotificationType compensated,
                        com.arjuna.webservices.wsaddr.AddressingContext addressingContext,
                        com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
Handle the compensated event.

Specified by:
compensated in interface com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents
Parameters:
compensated - The compensated notification.
addressingContext - The addressing context.
arjunaContext - The arjuna context. Active -> Active (invalid state) Canceling -> Canceling (invalid state) Canceling-Active -> Canceling (invalid state) Canceling-Completing -> Canceling (invalid state) Completing -> Completing (invalid state) Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Ended Faulting -> Faulting (invalid state) Faulting-Active -> Faulting (invalid state) Faulting-Compensating -> Faulting (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended

completed

public void completed(com.arjuna.webservices.wsba.NotificationType completed,
                      com.arjuna.webservices.wsaddr.AddressingContext addressingContext,
                      com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
Handle the completed event.

Specified by:
completed in interface com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents
Parameters:
completed - The completed notification.
addressingContext - The addressing context.
arjunaContext - The arjuna context. Active -> Completed Canceling -> Canceling (invalid state) Canceling-Active -> Canceling (invalid state) Canceling-Completing -> Completed Completing -> Completed Completed -> Completed Closing -> Closing (resend close) Compensating -> Compensating (resend compensate) Faulting -> Faulting (invalid state) Faulting-Active -> Faulting (invalid state) Faulting-Compensating -> Faulting Exiting -> Exiting (invalid state) Ended -> Ended

exit

public void exit(com.arjuna.webservices.wsba.NotificationType exit,
                 com.arjuna.webservices.wsaddr.AddressingContext addressingContext,
                 com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
Handle the exit event.

Specified by:
exit in interface com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents
Parameters:
exit - The exit notification.
addressingContext - The addressing context.
arjunaContext - The arjuna context. Active -> Exiting Canceling -> Exiting Canceling-Active -> Exiting Canceling-Completing -> Exiting Completing -> Exiting Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Compensating (invalid state) Faulting -> Faulting (invalid state) Faulting-Active -> Faulting (invalid state) Faulting-Compensating -> Faulting (invalid state) Exiting -> Exiting Ended -> Ended (resend Exited)

fault

public void fault(com.arjuna.webservices.wsba.ExceptionType fault,
                  com.arjuna.webservices.wsaddr.AddressingContext addressingContext,
                  com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
Handle the fault event.

Specified by:
fault in interface com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents
Parameters:
fault - The fault exception.
addressingContext - The addressing context.
arjunaContext - The arjuna context. Active -> Faulting-Active Canceling -> Faulting-Active Canceling-Active -> Faulting-Active Canceling-Completing -> Faulting-Active Completing -> Faulting-Active Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Faulting-Compensating Faulting -> Faulting Faulting-Active -> Faulting Faulting-Compensating -> Faulting Exiting -> Exiting (invalid state) Ended -> Ended (resend Faulted)

getStatus

public void getStatus(com.arjuna.webservices.wsba.NotificationType getStatus,
                      com.arjuna.webservices.wsaddr.AddressingContext addressingContext,
                      com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
Handle the getStatus event.

Specified by:
getStatus in interface com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents
Parameters:
getStatus - The getStatus notification.
addressingContext - The addressing context.
arjunaContext - The arjuna context.

status

public void status(com.arjuna.webservices.wsba.StatusType status,
                   com.arjuna.webservices.wsaddr.AddressingContext addressingContext,
                   com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
Handle the status event.

Specified by:
status in interface com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents
Parameters:
status - The status.
addressingContext - The addressing context.
arjunaContext - The arjuna context.

getStatus

public com.arjuna.webservices.wsba.State getStatus()
Handle the get status event.

Returns:
The state.

cancel

public com.arjuna.webservices.wsba.State cancel()
Handle the cancel event.

Returns:
The state.

compensate

public com.arjuna.webservices.wsba.State compensate()
Handle the compensate event.

Returns:
The state.

complete

public com.arjuna.webservices.wsba.State complete()
Handle the complete event.

Returns:
The state.

close

public com.arjuna.webservices.wsba.State close()
Handle the close event.

Returns:
The state.

soapFault

public void soapFault(com.arjuna.webservices.SoapFault soapFault,
                      com.arjuna.webservices.wsaddr.AddressingContext addressingContext,
                      com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
Handle the soap fault event.

Specified by:
soapFault in interface com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEvents
Parameters:
soapFault - The soap fault.
addressingContext - The addressing context.
arjunaContext - The arjuna context.

getId

public java.lang.String getId()
Get the coordinator id.

Returns:
The coordinator id.

getParticipant

public com.arjuna.webservices.wsaddr.EndpointReferenceType getParticipant()
Get the participant endpoint reference

Returns:
The participant endpoint reference

getCoordinator

public BAParticipantManager getCoordinator()
Get the associated coordinator.

Returns:
The associated coordinator.