01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.handler;
05:
06: import com.tc.async.api.AbstractEventHandler;
07: import com.tc.async.api.ConfigurationContext;
08: import com.tc.async.api.EventContext;
09: import com.tc.object.ClientConfigurationContext;
10: import com.tc.object.msg.AcknowledgeTransactionMessage;
11: import com.tc.object.tx.ClientTransactionManager;
12:
13: /**
14: * @author steve
15: */
16: public class ReceiveTransactionCompleteHandler extends
17: AbstractEventHandler {
18: private ClientTransactionManager transactionManager;
19:
20: public void handleEvent(EventContext context) {
21: AcknowledgeTransactionMessage atm = (AcknowledgeTransactionMessage) context;
22: transactionManager.receivedAcknowledgement(atm
23: .getLocalSessionID(), atm.getRequestID());
24: }
25:
26: public void initialize(ConfigurationContext context) {
27: super .initialize(context);
28: ClientConfigurationContext cc = (ClientConfigurationContext) context;
29: transactionManager = cc.getTransactionManager();
30: }
31: }
|