callbackClient.invoke(null);
/** * Invoke the method remotely. * * @param param - payload for the server invoker handler. * @param metadata - any extra metadata that may be needed by the transport (i.e. GET or POST if * using http invoker) or if need to pass along extra data to the server invoker handler. */ public Object invoke(Object param, Map metadata) throws Throwable { return invoke(param, metadata, null); }
/** * Invokes the server invoker handler with the payload parameter passed. Same as calling * invoke(param, null); */ public Object invoke(Object param) throws Throwable { return invoke(param, null); }
/** * Returns an InetAddress for the client machine as seen by the server machine. * @return an InetAddress for the client machine as seen by the server machine. * @throws Throwable */ public InetAddress getAddressSeenByServer() throws Throwable { return (InetAddress) invoke("$GET_CLIENT_LOCAL_ADDRESS$"); }
/** * Makes a call on the remoting server. * * @throws Throwable */ public void makeInvocation() throws Throwable { Object response = remotingClient.invoke("Do something", null); System.out.println("Invocation response: " + response); }
public void run() { try { invoke(param, internalSendPayload); } catch (Throwable e) { // throw away exception since can't get it back to original caller log.error("Error executing client oneway invocation request: " + param, e); } } };
public void leave(ChatMember member) throws RemoteConnectionException, ShuttingDownException { RemoteInvocation invocation = new RemoteInvocation("leave", new Object[] {member}); try { serverClient.invoke(invocation); } catch (Throwable e) { log.error(e); throw new RemoteConnectionException(); } }
public void makeClientCall() throws Throwable { handler = new SampleCallbackHandler(); // Need to add callback listener to get callback client.addListener(handler, locator, client.getSessionId()); // make invocation Object answer = client.invoke(new Integer(17)); System.out.println("invocation returns: " + ((Integer) answer).intValue()); }
public void makeClientCall() throws Throwable { handler = new SampleCallbackHandler(); // Need to add callback listener to get callback client.addListener(handler, locator, client.getSessionId()); // make invocation Object answer = client.invoke(new Integer(17)); System.out.println("invocation returns: " + ((Integer) answer).intValue()); }
public ArrayList list() throws RemoteConnectionException, ShuttingDownException { RemoteInvocation invocation = new RemoteInvocation("list", null); try { return (ArrayList) managerClient.invoke(invocation); } catch (Throwable t) { log.error(t); t.printStackTrace(); throw new RemoteConnectionException(); } }
public ArrayList getBackChat() throws RemoteConnectionException, ShuttingDownException { RemoteInvocation invocation = new RemoteInvocation("getBackChat", null); try { return (ArrayList) serverClient.invoke(invocation); } catch (Throwable e) { log.error(e); throw new RemoteConnectionException(); } }
public ChatInfo getChatInfo() throws RemoteConnectionException, ShuttingDownException { RemoteInvocation invocation = new RemoteInvocation("getChatInfo", null); try { return (ChatInfo) serverClient.invoke(invocation); } catch (Throwable e) { log.error(e); throw new RemoteConnectionException(); } }
public void makeClientCall() throws Throwable { handler = new SampleCallbackHandler(); // Need to add callback listener to get callback client.addListener(handler, locator, client.getSessionId()); // make invocation Object answer = client.invoke(new Integer(17)); System.out.println("invocation returns: " + ((Integer) answer).intValue()); }
public void makeClientCall() throws Throwable { handler = new SampleCallbackHandler(); // Need to add callback listener to get callback client.addListener(handler, locator, client.getSessionId()); // make invocation Object answer = client.invoke(new Integer(17)); System.out.println("invocation returns: " + ((Integer) answer).intValue()); }
public void makeClientCall() throws Throwable { handler = new SampleCallbackHandler(); // Need to add callback listener to get callback client.addListener(handler, locator, client.getSessionId()); // make invocation Object answer = client.invoke(new Integer(17)); System.out.println("invocation returns: " + ((Integer) answer).intValue()); }
public void makeClientCall() throws Throwable { handler = new SampleCallbackHandler(); // Need to add callback listener to get callback client.addListener(handler, locator, client.getSessionId()); // make invocation Object answer = client.invoke(new Integer(17)); System.out.println("invocation returns: " + ((Integer) answer).intValue()); }
private void addNotificationListener(Method m, Object args[], String sig[], Map payload) throws Throwable { String methodName = m.getName(); Object key = ClientListener.register(serverId, (ObjectName) args[0], args[1], (NotificationFilter) args[2], args[3]); listeners.add(key); Object a[] = new Object[]{args[0], null, args[2], key}; // make sure we pass our local id as session id client.setSessionId(serverId); client.invoke(new NameBasedInvocation(methodName, a, sig), payload); }
public void send(ChatMessage mesg) throws RemoteConnectionException, ShuttingDownException { RemoteInvocation invocation = new RemoteInvocation("send", new Object[] {mesg}); try { serverClient.invoke(invocation); } catch (Throwable e) { log.error(e); throw new RemoteConnectionException(); } } }
public void makeInvocation(String locatorURI) throws Throwable { // create InvokerLocator with the url type string // indicating the target remoting server to call upon. InvokerLocator locator = new InvokerLocator(locatorURI); System.out.println("Calling remoting server with locator uri of: " + locatorURI); Client remotingClient = new Client(locator); remotingClient.connect(); NonSerializablePayload payload = new NonSerializablePayload("foo", 1); System.out.println("Invoking server with request of '" + payload + "'"); Object response = remotingClient.invoke(payload); System.out.println("Invocation response: " + response); }
public void makeInvocation(String locatorURI) throws Throwable { // create InvokerLocator with the url type string // indicating the target remoting server to call upon. InvokerLocator locator = new InvokerLocator(locatorURI); System.out.println("Calling remoting server with locator uri of: " + locatorURI); Client remotingClient = new Client(locator); remotingClient.connect(); String request = "Do something"; System.out.println("Invoking server with request of '" + request + "'"); Object response = remotingClient.invoke(request); remotingClient.disconnect(); System.out.println("Invocation response: " + response); }