com.arjuna.wst11.messaging.engines
Class CoordinatorCompletionParticipantEngine

java.lang.Object
  extended by com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine
All Implemented Interfaces:
com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents

public class CoordinatorCompletionParticipantEngine
extends Object
implements com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents

The coordinator completion participant state engine

Author:
kevin

Constructor Summary
CoordinatorCompletionParticipantEngine(String id, W3CEndpointReference coordinator, BusinessAgreementWithCoordinatorCompletionParticipant participant)
          Construct the initial engine for the participant.
CoordinatorCompletionParticipantEngine(String id, W3CEndpointReference coordinator, BusinessAgreementWithCoordinatorCompletionParticipant participant, com.arjuna.webservices11.wsba.State state, boolean recovered)
          Construct the engine for the participant in a specified state.
 
Method Summary
 void cancel(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType cancel, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
          Handle the cancel event.
 com.arjuna.webservices11.wsba.State cannotComplete()
          Handle the cannot complete event.
 void close(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType close, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
          Handle the close event.
 void compensate(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType compensate, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
          Handle the compensate event.
 void complete(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType complete, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
          Handle the complete event.
 com.arjuna.webservices11.wsba.State completed()
          Handle the completed event.
 com.arjuna.webservices11.wsba.State exit()
          Handle the exit event.
 void exited(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType exited, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
          Handle the exited event.
 com.arjuna.webservices11.wsba.State fail(QName exceptionIdentifier)
          Handle the fail event.
 void failed(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType failed, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
          Handle the failed event.
 W3CEndpointReference getCoordinator()
          Get the coordinator endpoint reference
 String getId()
          Get the coordinator id.
 BusinessAgreementWithCoordinatorCompletionParticipant getParticipant()
          Get the associated participant.
 void getStatus(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType getStatus, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
          Handle the getStatus event.
 boolean isRecovered()
          check whether this participant's details have been recovered from the log
 void notCompleted(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType notCompleted, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
          Handle the not completed event.
 void recovery()
          Handle the recovery 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.
 void status(org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType status, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.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(String id,
                                              W3CEndpointReference 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(String id,
                                              W3CEndpointReference coordinator,
                                              BusinessAgreementWithCoordinatorCompletionParticipant participant,
                                              com.arjuna.webservices11.wsba.State state,
                                              boolean recovered)
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.
recovered - true if the engine has been recovered from th elog otherwise false
Method Detail

cancel

public void cancel(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType cancel,
                   org.jboss.ws.api.addressing.MAP map,
                   com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
Handle the cancel event.

Specified by:
cancel in interface com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
cancel - The cancel notification.
map - The addressing context.
arjunaContext - The arjuna context. Active -> Canceling Canceling -> Canceling Completing -> Canceling Completed -> Completed (resend Completed) Closing -> Closing Compensating -> Compensating Failing-Active -> Failing-Active (resend Fail) Failing-Canceling -> Failing-Canceling (resend Fail) Failing-Completing -> Failing-Completing (resend Fail) Failing-Compensating -> Failing-Compensating NotCompleting -> NotCompleting (resend CannotComplete) Exiting -> Exiting (resend Exit) Ended -> Ended (send Canceled)

close

public void close(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType close,
                  org.jboss.ws.api.addressing.MAP map,
                  com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
Handle the close event.

Specified by:
close in interface com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
close - The close notification.
map - 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) Failing-Active -> Failing-Active (invalid state) Failing-Canceling -> Failing-Canceling (invalid state) Failing-Completing -> Failing-Completing (invalid state) Failing-Compensating -> Failing-Compensating (invalid state) NotCompleting -> NotCompleting (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended (send Closed)

compensate

public void compensate(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType compensate,
                       org.jboss.ws.api.addressing.MAP map,
                       com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
Handle the compensate event.

Specified by:
compensate in interface com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
compensate - The compensate notification.
map - 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 Failing-Active -> Failing-Active (invalid state) Failing-Canceling -> Failing-Canceling (invalid state) Failing-Completing -> Failing-Completing (invalid state) Failing-Compensating -> Failing-Compensating (resend Fail) NotCompleting -> NotCompleting (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended (send Compensated)

complete

public void complete(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType complete,
                     org.jboss.ws.api.addressing.MAP map,
                     com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
Handle the complete event.

Specified by:
complete in interface com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
complete - The complete notification.
map - The addressing context.
arjunaContext - The arjuna context. Active -> Completing Canceling -> Canceling Completing -> Completing Completed -> Completed (resend Completed) Closing -> Closing Compensating -> Compensating Failing-Active -> Failing-Active (resend Fail) Failing-Canceling -> Failing-Canceling (resend Fail) Failing-Completing -> Failing-Completing (resend Fail) Failing-Compensating -> Failing-Compensating NotCompleting -> NotCompleting (resend CannotComplete) Exiting -> Exiting (resend Exit) Ended -> Ended (send Fail)

exited

public void exited(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType exited,
                   org.jboss.ws.api.addressing.MAP map,
                   com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
Handle the exited event.

Specified by:
exited in interface com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
exited - The exited notification.
map - 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) Failing-Active -> Failing-Active (invalid state) Failing-Canceling -> Failing-Canceling (invalid state) Failing-Completing -> Failing-Completing (invalid state) Failing-Compensating -> Failing-Compensating (invalid state) NotCompleting -> NotCompleting (invalid state) Exiting -> Ended Ended -> Ended

failed

public void failed(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType failed,
                   org.jboss.ws.api.addressing.MAP map,
                   com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
Handle the failed event.

Specified by:
failed in interface com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
failed - The failed notification.
map - 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) Failing-Active -> Ended Failing-Canceling -> Ended Failing-Completing -> Ended Failing-Compensating -> Ended NotCompleting -> NotCompleting (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended

notCompleted

public void notCompleted(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType notCompleted,
                         org.jboss.ws.api.addressing.MAP map,
                         com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
Handle the not completed event.

Specified by:
notCompleted in interface com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
notCompleted - The not completed notification.
map - 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) Failing-Active -> Failing-Active (invalid state) Failing-Canceling -> Failing-Canceling (invalid state) Failing-Completing -> Failing-Completing (invalid state) Failing-Compensating -> Failing-Compensating (invalid state) NotCompleting -> Ended Exiting -> Exiting (invalid state) Ended -> Ended

getStatus

public void getStatus(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType getStatus,
                      org.jboss.ws.api.addressing.MAP map,
                      com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
Handle the getStatus event.

Specified by:
getStatus in interface com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
getStatus - The getStatus notification.
map - The addressing context.
arjunaContext - The arjuna context.

status

public void status(org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType status,
                   org.jboss.ws.api.addressing.MAP map,
                   com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext)
Handle the status event.

Specified by:
status in interface com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents
Parameters:
status - The status type.
map - The addressing context.
arjunaContext - The arjuna context.

recovery

public void recovery()
Handle the recovery event. Active -> Active (invalid state) Canceling -> Canceling (invalid state) Completed -> Completed (resend completed) Closing -> Closing (invalid state) Compensating -> Compensating (invalid state) Failing-Active -> Failing-Active (invalid state) Failing-Canceling -> Failing-Canceling (invalid state) Failing-Compensating -> Failing-Compensating (invalid state) NotCompleting -> NotCompleting (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended (invalid state)


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

completed

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


exit

public com.arjuna.webservices11.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) Failing-Active -> Failing-Active (invalid state) Failing-Canceling -> Failing-Canceling (invalid state) Failing-Completing -> Failing-Completing (invalid state) Failing-Compensating -> Failing-Compensating (invalid state) Exiting -> Exiting NotCompleting -> NotCompleting (invalid state) Ended -> Ended (invalid state)


fail

public com.arjuna.webservices11.wsba.State fail(QName exceptionIdentifier)
Handle the fail event. Active -> Failing-Active Canceling -> Failing-Canceling Completing -> Failing-Completing Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Failing-Compensating Failing-Active -> Failing-Active Failing-Canceling -> Failing-Canceling Failing-Completing -> Failing-Completing Failing-Compensating -> Failing-Compensating NotCompleting -> NotCompleting (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended (invalid state)


cannotComplete

public com.arjuna.webservices11.wsba.State cannotComplete()
Handle the cannot complete event. Active -> NotCompleting Canceling -> Canceling (invalid state) Completing -> NotCompleting Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Compensating (invalid state) Failing-Active -> Failing-Active (invalid state) Failing-Canceling -> Failing-Canceling (invalid state) Failing-Completing -> Failing-Completing (invalid state) Failing-Compensating -> Failing-Compensating (invalid state) NotCompleting -> NotCompleting Exiting -> Exiting (invalid state) Ended -> Ended (invalid state)


getId

public String getId()
Get the coordinator id.

Returns:
The coordinator id.

getCoordinator

public W3CEndpointReference getCoordinator()
Get the coordinator endpoint reference

Returns:
The coordinator endpoint reference

getParticipant

public BusinessAgreementWithCoordinatorCompletionParticipant getParticipant()
Get the associated participant.

Returns:
The associated participant.

isRecovered

public boolean isRecovered()
check whether this participant's details have been recovered from the log

Returns:
true if the participant is recovered otherwise false


Copyright © 2011. All Rights Reserved.