Package org.jboss.remoting.transport.bisocket

Examples of org.jboss.remoting.transport.bisocket.BisocketServerInvoker


      invocationHandler = new TestInvocationHandler();
      connector.addInvocationHandler("test", invocationHandler);
      connector.start();
     
      // Check bind ports in secondary locator.
      BisocketServerInvoker invoker = (BisocketServerInvoker) connector.getServerInvoker();
      Field field = BisocketServerInvoker.class.getDeclaredField("secondaryLocator");
      field.setAccessible(true);
      InvokerLocator secondaryLocator = (InvokerLocator) field.get(invoker);
      log.info("secondaryLocator: " + secondaryLocator);
      List homes = secondaryLocator.getHomeList();
View Full Code Here


      invocationHandler = new TestInvocationHandler();
      connector.addInvocationHandler("test", invocationHandler);
      connector.start();
     
      // Check connect ports in secondary locator.
      BisocketServerInvoker invoker = (BisocketServerInvoker) connector.getServerInvoker();
      Field field = BisocketServerInvoker.class.getDeclaredField("secondaryLocator");
      field.setAccessible(true);
      InvokerLocator secondaryLocator = (InvokerLocator) field.get(invoker);
      log.info("secondaryLocator: " + secondaryLocator);
      List homes = secondaryLocator.getHomeList();
View Full Code Here

      invocationHandler = new TestInvocationHandler();
      connector.addInvocationHandler("test", invocationHandler);
      connector.start();
     
      // Check bind ports in secondary locator.
      BisocketServerInvoker invoker = (BisocketServerInvoker) connector.getServerInvoker();
      Field field = BisocketServerInvoker.class.getDeclaredField("secondaryLocator");
      field.setAccessible(true);
      InvokerLocator secondaryLocator = (InvokerLocator) field.get(invoker);
      log.info("secondaryLocator: " + secondaryLocator);
      List homes = secondaryLocator.getHomeList();
View Full Code Here

      config.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraServerConfig(config);
      connector = new Connector(serverLocator, config);
      connector.create();
      assertTrue(connector.getServerInvoker() instanceof BisocketServerInvoker);
      BisocketServerInvoker serverInvoker = (BisocketServerInvoker) connector.getServerInvoker();
      serverInvoker.setSecondaryBindPort(PORT);
      invocationHandler = new TestInvocationHandler();
      connector.addInvocationHandler("sample", invocationHandler);
      connector.start();
     
      // Create client.
View Full Code Here

      Set callbackConnectors = client.getCallbackConnectors(callbackHandler);
      assertEquals(1, callbackConnectors.size());
      Connector callbackConnector = (Connector) callbackConnectors.iterator().next();
      Field field = BisocketServerInvoker.class.getDeclaredField("controlMonitorTimerTask");
      field.setAccessible(true);     
      BisocketServerInvoker serverInvoker = (BisocketServerInvoker) callbackConnector.getServerInvoker();
      TimerTask timerTask = (TimerTask) field.get(serverInvoker);
      assertNull(timerTask);
      log.info("ControlMonitorTimerTask was not created");
     
      // Verify PingTimerTask is not created.
View Full Code Here

      Set callbackConnectors = client.getCallbackConnectors(callbackHandler);
      assertEquals(1, callbackConnectors.size());
      Connector callbackConnector = (Connector) callbackConnectors.iterator().next();
      Field field = BisocketServerInvoker.class.getDeclaredField("controlMonitorTimerTask");
      field.setAccessible(true);     
      BisocketServerInvoker serverInvoker = (BisocketServerInvoker) callbackConnector.getServerInvoker();
      TimerTask timerTask = (TimerTask) field.get(serverInvoker);
      assertNotNull(timerTask);
      log.info("ControlMonitorTimerTask was created");
     
      // Verify PingTimerTask is created.
      field = ServerInvoker.class.getDeclaredField("callbackHandlers");
      field.setAccessible(true);
      BisocketServerInvoker callbackServerInvoker = (BisocketServerInvoker) connector.getServerInvoker();
      Map callbackHandlers = (Map) field.get(callbackServerInvoker);
      assertEquals(1, callbackHandlers.size());
      Object o = callbackHandlers.values().iterator().next();
      Client callbackClient = ((ServerInvokerCallbackHandler) o).getCallbackClient();
      BisocketClientInvoker clientInvoker = (BisocketClientInvoker) callbackClient.getInvoker();
View Full Code Here

      assertEquals(1, callbackConnectors.size());
      Set callbackConnectorSet = (Set) callbackConnectors.values().iterator().next();
      assertEquals(1, callbackConnectorSet.size());
      Connector callbackConnector = (Connector) callbackConnectorSet.iterator().next();
      assertTrue(callbackConnector.getServerInvoker() instanceof BisocketServerInvoker);
      BisocketServerInvoker callbackServerInvoker = (BisocketServerInvoker) callbackConnector.getServerInvoker();
      field = BisocketServerInvoker.class.getDeclaredField("controlConnectionThreadMap");
      field.setAccessible(true);
      Map controlConnectionThreadMap = (Map) field.get(callbackServerInvoker);
      assertEquals(1, controlConnectionThreadMap.size());
      Thread controlConnectionThread = (Thread) controlConnectionThreadMap.values().iterator().next();
View Full Code Here

      client.addListener(callbackHandler, metadata);
      client.invoke(CALLBACK_TEST);
      assertEquals(1, callbackHandler.counter);
      log.info("callback handler is installed");
     
      BisocketServerInvoker invoker = (BisocketServerInvoker) connector.getServerInvoker();
      assertEquals(threadCount, invoker.getDosMaxThreads());
      assertEquals(timeout, invoker.getDosTimeout());
      verifyThreadValues(invoker, threadCount, timeout);

      client.removeListener(callbackHandler);
      client.disconnect();
      connector.stop();
View Full Code Here

     
      // Get callback server thread pools.
      Set callbackConnectors = client.getCallbackConnectors(callbackHandler);
      assertEquals(1, callbackConnectors.size());
      Connector callbackConnector = (Connector) callbackConnectors.iterator().next();
      BisocketServerInvoker invoker = (BisocketServerInvoker) callbackConnector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("threadpool");
      field.setAccessible(true);
      List threadpool = (List) field.get(invoker);
      field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
View Full Code Here

TOP

Related Classes of org.jboss.remoting.transport.bisocket.BisocketServerInvoker

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.