Package org.jboss.remoting.transport

Examples of org.jboss.remoting.transport.ClientInvoker


     
      Client callbackClient1 = serverInvokerCallbackHandler1.getCallbackClient();
      Client callbackClient2 = serverInvokerCallbackHandler2.getCallbackClient();
      assertNotSame(callbackClient1, callbackClient2);
 
      ClientInvoker clientInvoker1 = callbackClient1.getInvoker();
      assertTrue(clientInvoker1 instanceof BisocketClientInvoker);
      ClientInvoker clientInvoker2 = callbackClient2.getInvoker();
      assertTrue(clientInvoker2 instanceof BisocketClientInvoker);
      assertNotSame(clientInvoker1, clientInvoker2);
     
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
View Full Code Here


      log.info("clients added callback handler");
     
      Iterator it = invocationHandler.callbackHandlers.iterator();
      ServerInvokerCallbackHandler serverInvokerCallbackHandler = (ServerInvokerCallbackHandler) it.next();
      Client callbackClient = serverInvokerCallbackHandler.getCallbackClient();
      ClientInvoker clientInvoker = callbackClient.getInvoker();
      assertTrue(clientInvoker instanceof BisocketClientInvoker);
     
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      List pool = (List) field.get(clientInvoker);
View Full Code Here

      ServerInvokerCallbackHandler serverInvokerCallbackHandler1 = (ServerInvokerCallbackHandler) it.next();
      ServerInvokerCallbackHandler serverInvokerCallbackHandler2 = (ServerInvokerCallbackHandler) it.next();
      Client callbackClient1 = serverInvokerCallbackHandler1.getCallbackClient();
      Client callbackClient2 = serverInvokerCallbackHandler2.getCallbackClient();
      assertNotSame(callbackClient1, callbackClient2);
      ClientInvoker clientInvoker1 = callbackClient1.getInvoker();
      assertTrue(clientInvoker1 instanceof BisocketClientInvoker);
      ClientInvoker clientInvoker2 = callbackClient2.getInvoker();
      assertTrue(clientInvoker2 instanceof BisocketClientInvoker);
      assertNotSame(clientInvoker1, clientInvoker2);
     
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
View Full Code Here

      ServerInvokerCallbackHandler serverInvokerCallbackHandler1 = (ServerInvokerCallbackHandler) it.next();
      ServerInvokerCallbackHandler serverInvokerCallbackHandler2 = (ServerInvokerCallbackHandler) it.next();
      Client callbackClient1 = serverInvokerCallbackHandler1.getCallbackClient();
      Client callbackClient2 = serverInvokerCallbackHandler2.getCallbackClient();
      assertNotSame(callbackClient1, callbackClient2);
      ClientInvoker clientInvoker1 = callbackClient1.getInvoker();
      assertTrue(clientInvoker1 instanceof BisocketClientInvoker);
      ClientInvoker clientInvoker2 = callbackClient2.getInvoker();
      assertTrue(clientInvoker2 instanceof BisocketClientInvoker);
      assertNotSame(clientInvoker1, clientInvoker2);
     
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
View Full Code Here

      ServerInvokerCallbackHandler serverInvokerCallbackHandler1 = (ServerInvokerCallbackHandler) it.next();
      ServerInvokerCallbackHandler serverInvokerCallbackHandler2 = (ServerInvokerCallbackHandler) it.next();
      Client callbackClient1 = serverInvokerCallbackHandler1.getCallbackClient();
      Client callbackClient2 = serverInvokerCallbackHandler2.getCallbackClient();
      assertNotSame(callbackClient1, callbackClient2);
      ClientInvoker clientInvoker1 = callbackClient1.getInvoker();
      assertTrue(clientInvoker1 instanceof BisocketClientInvoker);
      ClientInvoker clientInvoker2 = callbackClient2.getInvoker();
      assertTrue(clientInvoker2 instanceof BisocketClientInvoker);
      assertNotSame(clientInvoker1, clientInvoker2);
     
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
View Full Code Here

    * an invocation with an invocation specific timeout has been executed.
    */
   public void testTimeoutReset() throws Throwable
   {
      log.info("entering " + getName());
      ClientInvoker invoker = client.getInvoker();
      assertTrue(invoker instanceof MicroSocketClientInvoker);
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      List pool = (List) field.get(invoker);
      assertEquals(0, pool.size());
View Full Code Here

    * an invocation with an invocation specific timeout has been executed.
    */
   public void testTimeoutReset() throws Throwable
   {
      log.info("entering " + getName());
      ClientInvoker invoker = client.getInvoker();
      assertTrue(invoker instanceof MicroSocketClientInvoker);
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      List pool = (List) field.get(invoker);
      assertEquals(0, pool.size());
View Full Code Here

         configuration.put(Multiplex.MULTIPLEX_BIND_PORT, "6565");
         Client client = new Client(connectorLocator, configuration);
         client.connect();
        
         // Get ClientInvoker
         ClientInvoker clientInvoker = null;
         ClientInvoker[] clientInvokers = InvokerRegistry.getClientInvokers();;
         for (int i = 0; i < clientInvokers.length; i++)
         {
            if(clientInvokers[i].getLocator().equals(connectorLocator))
            {
View Full Code Here

         if (trace)
         {
            log.trace("destroying client invoker " + locator + ", config " + configuration);
         }

         ClientInvoker invoker = decrementClientInvokerCounter(locator, configuration);

         if(invoker != null)
         {
            if (trace)
            {
               log.trace("disconnecting " + invoker);
            }
            invoker.disconnect();
            invoker = null;
         }
      }
   }
View Full Code Here

      {
         throw new NullPointerException("locator cannot be null");
      }
      synchronized(clientLock)
      {
         ClientInvoker invoker = getRegisteredClientInvoker(locator, configuration);
         if(invoker != null)
         {
            if(trace) { log.trace("Found and returning cached client invoker (" + invoker + ")"); }
            return invoker;
         }

         boolean isForceRemote = false;
         boolean isPassByValue = false;
         Map parameters = locator.getParameters();
         if(parameters != null)
         {
            String value = (String) parameters.get(InvokerLocator.BYVALUE);
            if(value != null && Boolean.valueOf(value).booleanValue())
            {
               isPassByValue = true;
            }
            value = (String) parameters.get(InvokerLocator.FORCE_REMOTE);
            if(value != null && Boolean.valueOf(value).booleanValue())
            {
               isForceRemote = true;
            }
         }
         // configuration map will override locator params
         if(configuration != null)
         {
            String value = (String) configuration.get(InvokerLocator.BYVALUE);
            if(value != null && Boolean.valueOf(value).booleanValue())
            {
               isPassByValue = true;
            }
            value = (String) configuration.get(InvokerLocator.FORCE_REMOTE);
            if(value != null && Boolean.valueOf(value).booleanValue())
            {
               isForceRemote = true;
            }
         }

         // Check to see if server invoker is local
         // If in server locators map, then created locally by this class
         ServerInvoker svrInvoker = (ServerInvoker) serverLocators.get(locator);
         if(svrInvoker != null && !isForceRemote)
         {
            LocalClientInvoker localInvoker = new LocalClientInvoker(locator, configuration, isPassByValue);
            // have to set reference to local server invoker so client in invoke directly
            localInvoker.setServerInvoker(svrInvoker);
            invoker = localInvoker;
            InvokerLocator l = invoker.getLocator();

            addRegisteredClientInvoker(invoker, l, configuration);
         }
         else //not local
         {
            String protocol = locator.getProtocol();
            if(protocol == null)
            {
               throw new NullPointerException("protocol cannot be null for the locator");
            }

            invoker = loadClientInvoker(protocol, locator, configuration);

            InvokerLocator l = invoker.getLocator();

            addRegisteredClientInvoker(invoker, l, configuration);
         }
         return invoker;
      }
View Full Code Here

TOP

Related Classes of org.jboss.remoting.transport.ClientInvoker

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.