com.arjuna.wst11.messaging.engines
Class ParticipantCompletionParticipantEngine

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

public class ParticipantCompletionParticipantEngine
extends Object
implements com.arjuna.webservices11.wsba.ParticipantCompletionParticipantInboundEvents

The participant completion participant state engine

Author:
kevin

Constructor Summary
ParticipantCompletionParticipantEngine(String id, W3CEndpointReference coordinator, BusinessAgreementWithParticipantCompletionParticipant participant)
          Construct the initial engine for the participant.
ParticipantCompletionParticipantEngine(String id, W3CEndpointReference coordinator, BusinessAgreementWithParticipantCompletionParticipant 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.
 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.
 BusinessAgreementWithParticipantCompletionParticipant 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

ParticipantCompletionParticipantEngine

public ParticipantCompletionParticipantEngine(String id,
                                              W3CEndpointReference coordinator,
                                              BusinessAgreementWithParticipantCompletionParticipant participant)
Construct the initial engine for the participant.

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

ParticipantCompletionParticipantEngine

public ParticipantCompletionParticipantEngine(String id,
                                              W3CEndpointReference coordinator,
                                              BusinessAgreementWithParticipantCompletionParticipant 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.ParticipantCompletionParticipantInboundEvents
Parameters:
cancel - The cancel notification.
map - The addressing context.
arjunaContext - The arjuna context. Active -> Canceling Canceling -> Canceling Completed -> Completed (resend Completed) Closing -> Closing Compensating -> Compensating Failing-Active -> Failing-Active (resend Fail) Failing-Canceling -> Failing-Canceling (resend Fail) Failing-Compensating -> Failing-Compensating NotCompleting -> NotCompleting (resend CannotComplete) Exiting -> Exiting (resend Exit) Ended -> Ended (resend Cancelled)

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.ParticipantCompletionParticipantInboundEvents
Parameters:
close - The close notification.
map - The addressing context.
arjunaContext - The arjuna context. Active -> Active (invalid state) Canceling -> Canceling (invalid state) Completed -> Closing Closing -> Closing 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 (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.ParticipantCompletionParticipantInboundEvents
Parameters:
compensate - The compensate notification.
map - The addressing context.
arjunaContext - The arjuna context. Active -> Active (invalid state) Canceling -> Canceling (invalid state) Completed -> Compensating Closing -> Closing (invalid state) Compensating -> Compensating Failing-Active -> Failing-Active (invalid state) Failing-Canceling -> Failing-Canceling (invalid state) Failing-Compensating -> Failing-Compensating (resend Fail) NotCompleting -> NotCompleting (invalid state) Exiting -> Exiting (invalid state) Ended -> Ended (send Compensated)

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.ParticipantCompletionParticipantInboundEvents
Parameters:
exited - The exited notification.
map - The addressing context.
arjunaContext - The arjuna context. Active -> Active (invalid state) Canceling -> Canceling (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-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.ParticipantCompletionParticipantInboundEvents
Parameters:
failed - The failed notification.
map - The addressing context.
arjunaContext - The arjuna context. Active -> Active (invalid state) Canceling -> Canceling (invalid state) Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Compensating (invalid state) Failing-Active -> Ended Failing-Canceling -> 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.ParticipantCompletionParticipantInboundEvents
Parameters:
notCompleted - The notCompleted notification.
map - The addressing context.
arjunaContext - The arjuna context. Active -> Active (invalid state) Canceling -> Canceling (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-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.ParticipantCompletionParticipantInboundEvents
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.ParticipantCompletionParticipantInboundEvents
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.ParticipantCompletionParticipantInboundEvents
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 -> Completed Canceling -> Canceling (invalid state) Completed -> 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)


exit

public com.arjuna.webservices11.wsba.State exit()
Handle the exit event. Active -> Exiting Canceling -> Canceling (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-Compensating -> Failing-Compensating (invalid state) NotCompleting -> NotCompleting (invalid state) Exiting -> Exiting Ended -> Ended (invalid state)


fail

public com.arjuna.webservices11.wsba.State fail(QName exceptionIdentifier)
Handle the fail event. Active -> Failing-Active Canceling -> Failing-Canceling Completed -> Completed (invalid state) Closing -> Closing (invalid state) Compensating -> Failing-Compensating Failing-Active -> Failing-Active Failing-Canceling -> Failing-Canceling 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) 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-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 BusinessAgreementWithParticipantCompletionParticipant 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 © 2012. All Rights Reserved.