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.l2.handler;
06:
07: import com.tc.async.api.AbstractEventHandler;
08: import com.tc.async.api.ConfigurationContext;
09: import com.tc.async.api.EventContext;
10: import com.tc.l2.context.StateChangedEvent;
11: import com.tc.l2.state.StateManager;
12: import com.tc.objectserver.core.api.ServerConfigurationContext;
13:
14: public class L2StateChangeHandler extends AbstractEventHandler {
15:
16: private StateManager stateManager;
17:
18: public void handleEvent(EventContext context) {
19: StateChangedEvent sce = (StateChangedEvent) context;
20: stateManager.fireStateChangedEvent(sce);
21: }
22:
23: public void initialize(ConfigurationContext context) {
24: super .initialize(context);
25: ServerConfigurationContext oscc = (ServerConfigurationContext) context;
26: this.stateManager = oscc.getL2Coordinator().getStateManager();
27: }
28:
29: }
|