1 7 package org.jboss.remoting; 8 9 import java.util.Map ; 10 11 12 15 public class Callback extends InvocationRequest 16 { 17 static final long serialVersionUID = -4778964132014467531L; 18 19 public final static String CALLBACK_HANDLE_OBJECT_KEY = "callback_handle_object"; 20 public final static String SERVER_LOCATOR_KEY = "server_locator"; 21 22 public Callback ( Object callbackPayload) 23 { 24 super(callbackPayload); 25 } 26 27 public Object getCallbackHandleObject() 28 { 29 Object handleObject = null; 30 Map returnPayload = getReturnPayload(); 31 if(returnPayload != null) 32 { 33 handleObject = returnPayload.get(CALLBACK_HANDLE_OBJECT_KEY); 34 } 35 return handleObject; 36 } 37 38 public Object getCallbackObject() 39 { 40 return getParameter(); 41 } 42 43 public InvokerLocator getServerLocator() 44 { 45 InvokerLocator locator = null; 46 Map returnPayload = getReturnPayload(); 47 if(returnPayload != null) 48 { 49 locator = (InvokerLocator)returnPayload.get(SERVER_LOCATOR_KEY); 50 } 51 return locator; 52 } 53 } | Popular Tags |