1 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.RequestManagedObjectResponseMessage; 12 13 16 public class ReceiveObjectHandler extends AbstractEventHandler { 17 private RemoteObjectManager objectManager; 18 19 public void handleEvent(EventContext context) { 20 RequestManagedObjectResponseMessage m = (RequestManagedObjectResponseMessage) context; 21 objectManager.addAllObjects(m.getLocalSessionID(), m.getBatchID(), m.getObjects()); 22 } 23 24 public void initialize(ConfigurationContext context) { 25 super.initialize(context); 26 ClientConfigurationContext ccc = (ClientConfigurationContext) context; 27 this.objectManager = ccc.getObjectManager(); 28 } 29 30 } | Popular Tags |