01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.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.object.ClientConfigurationContext;
10: import com.tc.object.RemoteObjectManager;
11: import com.tc.object.msg.RequestRootResponseMessage;
12:
13: public class ReceiveRootIDHandler extends AbstractEventHandler {
14: private RemoteObjectManager objectManager;
15:
16: public void handleEvent(EventContext context) {
17: RequestRootResponseMessage m = (RequestRootResponseMessage) context;
18: this .objectManager.addRoot(m.getRootName(), m.getRootID());
19:
20: }
21:
22: public void initialize(ConfigurationContext context) {
23: super .initialize(context);
24: ClientConfigurationContext ccc = (ClientConfigurationContext) context;
25: this.objectManager = ccc.getObjectManager();
26: }
27:
28: }
|