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.BatchTransactionAcknowledgeMessage;
11: import com.tc.object.tx.ClientTransactionManager;
12:
13: public class BatchTransactionAckHandler extends AbstractEventHandler {
14:
15: private ClientTransactionManager transactionManager;
16:
17: public void handleEvent(EventContext context) {
18: BatchTransactionAcknowledgeMessage msg = (BatchTransactionAcknowledgeMessage) context;
19: transactionManager.receivedBatchAcknowledgement(msg
20: .getBatchID());
21: }
22:
23: public void initialize(ConfigurationContext context) {
24: super .initialize(context);
25: ClientConfigurationContext cc = (ClientConfigurationContext) context;
26: transactionManager = cc.getTransactionManager();
27: }
28:
29: }
|