com.arjuna.wst.messaging.engines
Class CoordinatorCompletionParticipantEngine

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

public class CoordinatorCompletionParticipantEngine
extends java.lang.Object
implements com.arjuna.webservices.wsba.CoordinatorCompletionParticipantInboundEvents

The coordinator completion participant state engine

Author:
kevin

Constructor Summary
CoordinatorCompletionParticipantEngine(java.lang.String id, com.arjuna.webservices.wsaddr.EndpointReferenceType coordinator, BusinessAgreementWithCoordinatorCompletionParticipant participant)
          Construct the initial engine for the participant.
CoordinatorCompletionParticipantEngine(java.lang.String id, com.arjuna.webservices.wsaddr.EndpointReferenceType coordinator, BusinessAgreementWithCoordinatorCompletionParticipant participant, com.arjuna.webservices.wsba.State state)
          Construct the engine for the participant in a specified state.
 
Method Summary
 void cancel(com.arjuna.webservices.wsba.NotificationType cancel, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the cancel event.
 void close(com.arjuna.webservices.wsba.NotificationType close, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the close event.
 void compensate(com.arjuna.webservices.wsba.NotificationType compensate, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the compensate event.
 void complete(com.arjuna.webservices.wsba.NotificationType complete, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the complete event.
 com.arjuna.webservices.wsba.State completed()
          Handle the completed event.
 com.arjuna.webservices.wsba.State exit()
          Handle the exit event.
 void exited(com.arjuna.webservices.wsba.NotificationType exited, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the exited event.
 com.arjuna.webservices.wsba.State fault()
          Handle the fault event.
 void faulted(com.arjuna.webservices.wsba.NotificationType faulted, com.arjuna.webservices.wsaddr.AddressingContext addressingContext, com.arjuna.webservices.wsarj.ArjunaContext arjunaContext)
          Handle the faulted event.
 com.arjuna.webservices.wsaddr.EndpointReferenceType getCoordinator()
          Get the coordinator endpoint reference
 java.lang.String getId()
          Get the coordinator id.
 BusinessAgreementWithCoordinatorCompletionParticipant getParticipant()
          Get the associated participant.
 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 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

CoordinatorCompletionParticipantEngine

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

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

CoordinatorCompletionParticipantEngine

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

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

cancel

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

Specified by:
cancel in interface com.arjuna.webservices.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
cancel - The cancel notification.
addressingContext - The addressing context.
arjunaContext - The arjuna context. Active -> Canceling Canceling -> Canceling Completing -> Canceling Completed -> Completed (resend Completed) Closing -> Closing Compensating -> Compensating Faulting -> Faulting Faulting-Active -> Faulting (resend Fault) Faulting-Compensating -> Faulting Exiting -> Exiting (resend Exit) Ended -> Ended (resend Cancelled)

close

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

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

compensate

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

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

complete

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

Specified by:
complete in interface com.arjuna.webservices.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
complete - The complete notification.
addressingContext - The addressing context.
arjunaContext - The arjuna context. Active -> Completing Canceling -> Canceling Completing -> Completing Completed -> Completed (resend Completed) Closing -> Closing Compensating -> Compensating Faulting -> Faulting Faulting-Active -> Faulting (resend Fault) Faulting-Compensating -> Faulting Exiting -> Exiting (resend Exit) Ended -> Ended

exited

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

Specified by:
exited in interface com.arjuna.webservices.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
exited - The exited notification.
addressingContext - The addressing context.
arjunaContext - The arjuna context. Active -> Active (invalid state) Canceling -> Canceling (invalid state) 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 -> Ended Ended -> Ended

faulted

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

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

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.CoordinatorCompletionParticipantInboundEvents
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.CoordinatorCompletionParticipantInboundEvents
Parameters:
status - The status type.
addressingContext - The addressing context.
arjunaContext - The arjuna context.

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.CoordinatorCompletionParticipantInboundEvents
Parameters:
soapFault - The soap fault.
addressingContext - The addressing context.
arjunaContext - The arjuna context.

completed

public com.arjuna.webservices.wsba.State completed()
Handle the completed event. Active -> Completed Canceling -> Canceling (invalid state) Completing -> Completed Completed -> Completed Closing -> Closing (invalid state) Compensating -> Compensating (invalid state) Faulting -> Faulting (invalid state) Faulting-Active -> Faulting-Active (invalid state) Faulting-Compensating -> Faulting-Compensating (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended (invalid state)


exit

public com.arjuna.webservices.wsba.State exit()
Handle the exit event. Active -> Exiting Canceling -> Canceling (invalid state) Completing -> Exiting Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Compensating (invalid state) Faulting -> Faulting (invalid state) Faulting-Active -> Faulting-Active (invalid state) Faulting-Compensating -> Faulting-Compensating (invalid state) Exiting -> Exiting Ended -> Ended (invalid state)


fault

public com.arjuna.webservices.wsba.State fault()
Handle the fault event. Active -> Faulting-Active Canceling -> Canceling (invalid state) Completing -> Faulting-Active Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Faulting-Compensating Faulting -> Faulting Faulting-Active -> Faulting-Active Faulting-Compensating -> Faulting-Compensating Exiting -> Exiting (invalid state) Ended -> Ended (invalid state)


getId

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

Returns:
The coordinator id.

getCoordinator

public com.arjuna.webservices.wsaddr.EndpointReferenceType getCoordinator()
Get the coordinator endpoint reference

Returns:
The coordinator endpoint reference

getParticipant

public BusinessAgreementWithCoordinatorCompletionParticipant getParticipant()
Get the associated participant.

Returns:
The associated participant.