Package org.jboss.remoting

Examples of org.jboss.remoting.ServerInvoker


      log.info("RESTARTED CONNECTOR");
     
      // Wait until a failure has been detected on the control connection.
      Thread.sleep(TEST_PING_FREQUENCY * MAX_RETRIES * 8);
     
      ServerInvoker callbackServerInvoker = callbackConnector.getServerInvoker();
      field = BisocketServerInvoker.class.getDeclaredField("controlConnectionThreadMap");
      field.setAccessible(true);
      Map controlConnectionThreadMap = (Map) field.get(callbackServerInvoker);
      assertEquals(0, controlConnectionThreadMap.size());
     
View Full Code Here


            try
            {
               // Give the client a chance to connect to the server, then
               // disable the server.
               Thread.sleep(2000);
               ServerInvoker si = connector.getServerInvoker();
               assertTrue(si instanceof SocketServerInvoker);
               SocketServerInvoker ssi = (SocketServerInvoker) si;
               Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
               field.setAccessible(true);
               LRUPool clientpool = (LRUPool) field.get(ssi);
View Full Code Here

            try
            {
               // Give the client a chance to connect to the server, then
               // disable the server.
               Thread.sleep(2000);
               ServerInvoker si = connector.getServerInvoker();
               assertTrue(si instanceof SocketServerInvoker);
               SocketServerInvoker ssi = (SocketServerInvoker) si;
               Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
               field.setAccessible(true);
               LRUPool clientpool = (LRUPool) field.get(ssi);
View Full Code Here

      client.invoke(CALLBACK_TEST);
      assertEquals(1, callbackHandler.counter);
      log.info("callback handler is installed");

      // Verify that "timeout" is used correctly.
      ServerInvoker serverInvoker = connector.getServerInvoker();
      Field field = ServerInvoker.class.getDeclaredField("callbackHandlers");
      field.setAccessible(true);
      Map callbackHandlers = (Map) field.get(serverInvoker);
      assertEquals(1, callbackHandlers.size());
      ServerInvokerCallbackHandler serverInvokerCallbackHandler;
View Full Code Here

      connector.preRegister(server, null);
      connector.create();
      connector.start();
     
      // Verify that the ServerInvoker has a reference to the MBeanServer
      ServerInvoker invoker = connector.getServerInvoker();
      assertNotNull(invoker);
      assertEquals(server, invoker.getMBeanServer());
     
      // Verify that the ServerInvoker is registered with the MBeanServer
      ObjectName objectName = new ObjectName(invoker.getMBeanObjectName());
      assertTrue(server.isRegistered(objectName));
      assertTrue(server.isInstanceOf(objectName, "org.jboss.remoting.ServerInvoker"));
      Object o = server.getAttribute(objectName, "Configuration");;
      assertTrue(o instanceof Map);
      assertEquals("diamond", ((Map) o).get("bluemonkey"));
View Full Code Here

      ServerInvoker[] serverInvokers = InvokerRegistry.getServerInvokers();
      if (serverInvokers != null && serverInvokers.length > 0)
      {
         for (int x = 0; x < serverInvokers.length; x++)
         {
            ServerInvoker svrInvoker = serverInvokers[x];
            InvokerLocator locator = svrInvoker.getLocator();
            if (locatorUrl.equalsIgnoreCase(locator.getOriginalURI()))
            {
               return (ServletServerInvokerMBean) svrInvoker;
            }
         }
View Full Code Here

        
         // Make sure ClientInvoker is a LocalClientInvoker.
         assertTrue(clientInvoker instanceof LocalClientInvoker);

         // Get master MultiplexServerInvoker
         ServerInvoker serverInvoker = null;
         ServerInvoker[] serverInvokers = InvokerRegistry.getServerInvokers();;
         for (int i = 0; i < serverInvokers.length; i++)
         {
            if(serverInvokers[i].getLocator().equals(connectorLocator))
            {
View Full Code Here

         Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais);
         connector.setConfiguration(xml.getDocumentElement());
         connector.create();
        
         // Set ServerSocketFactory and SocketFactory in ServerInvoker.
         ServerInvoker serverInvoker = connector.getServerInvoker();
         ServerSocketFactory ssf2 = getDefaultServerSocketFactory();
         serverInvoker.setServerSocketFactory(ssf2);
         SocketFactory sf2 = getDefaultCallbackSocketFactory();
         serverInvoker.setSocketFactory(sf2);

         connector.addInvocationHandler("sample", new SampleInvocationHandler());
         connector.start();

         // Verify ServerSocketFactory is the one set in ServerInvoker.
         assertTrue(ssf2 == serverInvoker.getServerSocketFactory());
        
        
         /////////////////////////////////////
         /////    Do client side test.    ////
         /////////////////////////////////////
View Full Code Here

         connector.create();
         connector.addInvocationHandler("sample", new SampleInvocationHandler());
         connector.start();
        
         // Verify ServerSocketFactory is the one set in Connector.
         ServerInvoker serverInvoker = connector.getServerInvoker();
         assertTrue(ssf2 == serverInvoker.getServerSocketFactory());
        
        
         /////////////////////////////////////
         /////    Do client side test.    ////
         /////////////////////////////////////
View Full Code Here

         connector.create();
         connector.addInvocationHandler("sample", new SampleInvocationHandler());
         connector.start();

         // Verify ServerSocketFactory is the one passed in config map.
         ServerInvoker serverInvoker = connector.getServerInvoker();
         assertTrue(ssf1 == serverInvoker.getServerSocketFactory());
        
        
         /////////////////////////////////////
         /////    Do client side test.    ////
         /////////////////////////////////////
View Full Code Here

TOP

Related Classes of org.jboss.remoting.ServerInvoker

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.