1 7 package org.jboss.remoting.callback; 8 9 import java.util.Map ; 10 import org.jboss.remoting.InvocationRequest; 11 import org.jboss.remoting.InvokerLocator; 12 13 14 20 public class Callback extends InvocationRequest 21 { 22 static final long serialVersionUID = -4778964132014467531L; 23 24 public final static String CALLBACK_HANDLE_OBJECT_KEY = "callback_handle_object"; 25 public final static String SERVER_LOCATOR_KEY = "server_locator"; 26 27 32 public Callback(Object callbackPayload) 33 { 34 super(callbackPayload); 35 } 36 37 43 public Object getCallbackHandleObject() 44 { 45 Object handleObject = null; 46 Map returnPayload = getReturnPayload(); 47 if(returnPayload != null) 48 { 49 handleObject = returnPayload.get(CALLBACK_HANDLE_OBJECT_KEY); 50 } 51 return handleObject; 52 } 53 54 59 public Object getCallbackObject() 60 { 61 return getParameter(); 62 } 63 64 70 public InvokerLocator getServerLocator() 71 { 72 InvokerLocator locator = null; 73 Map returnPayload = getReturnPayload(); 74 if(returnPayload != null) 75 { 76 locator = (InvokerLocator) returnPayload.get(SERVER_LOCATOR_KEY); 77 } 78 return locator; 79 } 80 } | Popular Tags |