1 /*2 * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.3 */4 package com.tc.object.handler;5 6 import com.tc.async.api.AbstractEventHandler;7 import com.tc.async.api.ConfigurationContext;8 import com.tc.async.api.EventContext;9 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 }