01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.l2.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.l2.msg.L2StateMessage;
10: import com.tc.l2.state.StateManager;
11: import com.tc.objectserver.core.api.ServerConfigurationContext;
12:
13: public class L2StateMessageHandler extends AbstractEventHandler {
14:
15: private StateManager stateManager;
16:
17: public void handleEvent(EventContext context) {
18: L2StateMessage clusterMsg = (L2StateMessage) context;
19: stateManager.handleClusterStateMessage(clusterMsg);
20: }
21:
22: public void initialize(ConfigurationContext context) {
23: super .initialize(context);
24: ServerConfigurationContext oscc = (ServerConfigurationContext) context;
25: this.stateManager = oscc.getL2Coordinator().getStateManager();
26: }
27:
28: }
|