Examples of RPCManager


Examples of org.jboss.cache.RPCManager

   }

   public void testExceptionSuppression() throws Exception
   {
      PutForExternalReadTestBaseTL tl = threadLocal.get();
      RPCManager barfingRpcManager = EasyMock.createNiceMock(RPCManager.class);
      RPCManager originalRpcManager = tl.cache1.getConfiguration().getRuntimeConfig().getRPCManager();
      try
      {
         List<Address> memberList = originalRpcManager.getMembers();
         expect(barfingRpcManager.getMembers()).andReturn(memberList).anyTimes();
         expect(barfingRpcManager.getLocalAddress()).andReturn(originalRpcManager.getLocalAddress()).anyTimes();
         expect(barfingRpcManager.callRemoteMethods(anyAddresses(), (ReplicableCommand) anyObject(), anyBoolean(), anyLong(), anyBoolean())).andThrow(new RuntimeException("Barf!")).anyTimes();
         replay(barfingRpcManager);

         TestingUtil.extractComponentRegistry(tl.cache1).registerComponent(barfingRpcManager, RPCManager.class);
         tl.cache1.getConfiguration().getRuntimeConfig().setRPCManager(barfingRpcManager);
View Full Code Here

Examples of org.jboss.cache.RPCManager

    * @throws Exception
    */
   private void cacheModeLocalTest(boolean transactional) throws Exception
   {
      PutForExternalReadTestBaseTL tl = threadLocal.get();
      RPCManager rpcManager = EasyMock.createMock(RPCManager.class);
      RPCManager originalRpcManager = tl.cache1.getConfiguration().getRuntimeConfig().getRPCManager();

      // inject a mock RPC manager so that we can test whether calls made are sync or async.
      tl.cache1.getConfiguration().getRuntimeConfig().setRPCManager(rpcManager);

      // specify that we expect nothing will be called on the mock Rpc Manager.
View Full Code Here

Examples of rocks.xmpp.extensions.rpc.RpcManager

                                    }
                                }
                            }
                        });

                        RpcManager rpcManager = xmppSession.getExtensionManager(RpcManager.class);
                        rpcManager.setRpcHandler(new RpcHandler() {
                            @Override
                            public Value process(Jid requester, String methodName, List<Value> parameters) throws RpcException {
                                if (methodName.equals("examples.getStateName")) {
                                    if (!parameters.isEmpty()) {
                                        if (parameters.get(0).getAsInteger() == 6) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.