Package org.jboss.remoting.callback

Examples of org.jboss.remoting.callback.Callback


         {
            String test = (String) invocation.getParameter();
            if (test.equals(SYNCHRONOUS_TEST))
            {
               log.info("making synchronous callback");
               callbackHandler.handleCallback(new Callback(test));
               log.info("made synchronous callback");
            }
            else if (test.equals(ASYNCHRONOUS_SERVER_SIDE_TEST))
            {
               log.info("making asynchronous callback - server side");
               callbackHandler.handleCallbackOneway(new Callback("callback"), true);
            }
            else if (test.equals(ASYNCHRONOUS_CLIENT_SIDE_TEST))
            {
               log.info("making asynchronous callback - client side");
               callbackHandler.handleCallbackOneway(new Callback("callback"));
            }
            else if (test.equals(GET_STATUS))
            {
               synchronized (this)
               {
View Full Code Here


         log.info("sending callback with request for acknowledgement");
         HashMap returnPayload = new HashMap();
         returnPayload.put(ServerInvokerCallbackHandler.CALLBACK_LISTENER, this);
         returnPayload.put(ServerInvokerCallbackHandler.CALLBACK_ID, new GUID());
         returnPayload.put(ServerInvokerCallbackHandler.REMOTING_ACKNOWLEDGES_PUSH_CALLBACKS, "true");
         Callback callback = new Callback("callback");
         callback.setReturnPayload(returnPayload);
        
         try
         {
            callbackHandler.handleCallback(callback);
         }
View Full Code Here

      if(callbacks != null && callbacks.size() > 0)
      {
         for(int x = 0; x < callbacks.size(); x++)
         {
            Callback c = (Callback)callbacks.get(x);
            callbackWorked = c.getCallbackObject().equals(remotingClient.getSessionId());
            if(!callbackWorked)
            {
               break;
            }
         }
      }

      assertTrue(callbackWorked);

      boolean callbackWorked2 = false;

      if(callbacks2 != null && callbacks2.size() > 0)
      {
         for(int x = 0; x < callbacks2.size(); x++)
         {
            Callback c = (Callback)callbacks2.get(x);
            callbackWorked2 = c.getCallbackObject().equals(remotingClient2.getSessionId());
            if(!callbackWorked2)
            {
               break;
            }
         }
View Full Code Here

               Iterator it = callbackHandlers.iterator();
               while (it.hasNext())
               {
                  InvokerCallbackHandler callbackHandler = (InvokerCallbackHandler) it.next();
                  log.info("sending callback: " + ++counter);
                  callbackHandler.handleCallback(new Callback("callback"));
               }
               log.info("sent callback");
            }
            catch (HandleCallbackException e)
            {
View Full Code Here

         System.out.println("adding callback listener");
         this.callbackHandler = callbackHandler;
        
         try
         {
            Callback callback = new Callback(new Integer(secret));
            callbackHandler.handleCallback(callback);
         }
         catch(Exception e)
         {
            e.printStackTrace();
View Full Code Here

         {
            Iterator it = listeners.iterator();
            while (it.hasNext())
            {
               InvokerCallbackHandler handler = (InvokerCallbackHandler) it.next();
               handler.handleCallback(new Callback("test"));
            }
         }
         return invocation.getParameter();
      }
View Full Code Here

         String path = getClass().getResource(".").getPath();
         config.put(CallbackStore.FILE_PATH_KEY, path);
         store.setConfig(config);
         store.start();
        
         Callback callback = new Callback(new NonserializablePayload(7));
        
         try
         {
            store.add(callback);
            fail();
View Full Code Here

         config.put(InvokerLocator.SERIALIZATIONTYPE, "jboss");
         store.setConfig(config);
         store.start();
        
         Object payload = new NonserializablePayload(11);
         Callback callback = new Callback(payload);
        
         try
         {
            store.add(callback);
         }
         catch (Exception e)
         {
            log.error(e);
            e.printStackTrace();
            fail();
         }
        
         Callback retrievedCallback = (Callback) store.getNext();
         Object retrievedPayload = retrievedCallback.getParameter();
         assertTrue(payload.equals(retrievedPayload));
        
         passes = true;
      }
      catch (Throwable t)
View Full Code Here

      public Object invoke(InvocationRequest invocation) throws Throwable
      {
         for (int x = 0; x < listeners.size(); x++)
         {
            InvokerCallbackHandler callbackHandler = (InvokerCallbackHandler) listeners.get(x);
            callbackHandler.handleCallback(new Callback("This is callback payload"));
         }
         return "barfoo";
      }
View Full Code Here

       
        client.addListener(callbackHandler, callbackServerLocator);
       
        assertNotNull(invocationHandler.handler);
       
        Callback cb = new Callback("Squirrel");
       
        invocationHandler.handler.handleCallback(cb);
       
        assertNotNull(callbackHandler.callback);
        assertEquals("Squirrel", callbackHandler.callback.getParameter());
View Full Code Here

TOP

Related Classes of org.jboss.remoting.callback.Callback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.