KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > handler > RecallObjectsHandler


1 /*
2  * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.objectserver.handler;
5
6 import com.tc.async.api.AbstractEventHandler;
7 import com.tc.async.api.ConfigurationContext;
8 import com.tc.async.api.EventContext;
9 import com.tc.async.api.EventHandler;
10 import com.tc.objectserver.context.RecallObjectsContext;
11 import com.tc.objectserver.core.api.ServerConfigurationContext;
12 import com.tc.objectserver.tx.TransactionalObjectManager;
13
14 public class RecallObjectsHandler extends AbstractEventHandler implements EventHandler {
15
16   private TransactionalObjectManager txnObjectMgr;
17
18   public void handleEvent(EventContext context) {
19     RecallObjectsContext roc = (RecallObjectsContext) context;
20     txnObjectMgr.recallCheckedoutObject(roc);
21   }
22   
23   public void initialize(ConfigurationContext context) {
24     super.initialize(context);
25     ServerConfigurationContext oscc = (ServerConfigurationContext) context;
26     txnObjectMgr = oscc.getTransactionalObjectManager();
27   }
28
29 }
30
Popular Tags