KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > handler > DmiHandler


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

5 package com.tc.object.handler;
6
7 import com.tc.async.api.AbstractEventHandler;
8 import com.tc.async.api.EventContext;
9 import com.tc.object.dmi.DmiDescriptor;
10 import com.tc.object.event.DmiManager;
11 import com.tc.util.Assert;
12
13 public class DmiHandler extends AbstractEventHandler {
14
15   private final DmiManager dmiMgr;
16
17   public DmiHandler(DmiManager dmiMgr) {
18     Assert.pre(dmiMgr != null);
19     this.dmiMgr = dmiMgr;
20   }
21
22   public void handleEvent(EventContext context) {
23     DmiDescriptor dd = (DmiDescriptor) context;
24     dmiMgr.invoke(dd);
25   }
26
27 }
28
Popular Tags