01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.object.handler;
06:
07: import com.tc.async.api.AbstractEventHandler;
08: import com.tc.async.api.EventContext;
09: import com.tc.object.event.DmiEventContext;
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: DmiEventContext dmiEvent = (DmiEventContext) context;
24: dmiMgr.invoke(dmiEvent.getDmc());
25: }
26:
27: }
|