Package org.jboss.remoting

Examples of org.jboss.remoting.ServerInvoker


      client.connect();
      assertEquals("abc", client.invoke("abc"));
      log.info("client is connected");
     
      // Verify secondary ServerSocket port is set correctly.
      ServerInvoker serverInvoker = connector.getServerInvoker();
      assertTrue(serverInvoker instanceof BisocketServerInvoker);
      Field field = SocketServerInvoker.class.getDeclaredField("serverSocket");
      field.setAccessible(true);
      ServerSocket primaryServerSocket = (ServerSocket) field.get(serverInvoker);
      field = BisocketServerInvoker.class.getDeclaredField("secondaryServerSocket");
View Full Code Here


         connector.setConfiguration(xml.getDocumentElement());
         connector.create();

         connector.addInvocationHandler("sample", new SampleInvocationHandler());
         connector.start();
         ServerInvoker serverInvoker = connector.getServerInvoker();
         ServerSocketFactory ssf = serverInvoker.getServerSocketFactory();
         int ssfPort = PortUtil.findFreePort(getHostName());
         ServerSocket ss = ssf.createServerSocket(ssfPort);

         // Verify ServerSocketFactory is the one set in MBeanServer.
         assertEquals(secret, ss.getSoTimeout());
View Full Code Here

         connector.setConfiguration(xml.getDocumentElement());

         connector.create();
         connector.addInvocationHandler("sample", new SampleInvocationHandler());
         connector.start();
         ServerInvoker serverInvoker = connector.getServerInvoker();
         ServerSocketFactory ssf = serverInvoker.getServerSocketFactory();
         int ssfPort = PortUtil.findFreePort(getHostName());
         ServerSocket ss = ssf.createServerSocket(ssfPort);

         // Verify ServerSocketFactory is the one set in MBeanServer.
         assertEquals(secret, ss.getSoTimeout());
View Full Code Here

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

         // Verify ServerSocketFactory was configured according to SSL parameters
         // in config map.
         ServerInvoker serverInvoker = connector.getServerInvoker();
         ServerSocketFactory ssf = serverInvoker.getServerSocketFactory();
         assertTrue(ssf instanceof CustomSSLServerSocketFactory);
         CustomSSLServerSocketFactory csssf = (CustomSSLServerSocketFactory) ssf;
         SSLSocketBuilderMBean builder = csssf.getSSLSocketBuilder();
         assertFalse(builder.isServerSocketUseClientMode());
         assertEquals("JKS", builder.getKeyStoreType());
View Full Code Here

            it = new HashMap(virtualServerInvokers).values().iterator();
         }
        
         while (it.hasNext())
         {
            ServerInvoker serverInvoker = ((ServerInvoker) it.next());
            it.remove();
            serverInvoker.stop();
         }
      }
     
      if (socketGroupInfo != null)
      {
View Full Code Here

            if(log.isTraceEnabled())
            {
               log.trace("Error calling on " + serverInvoker + " because is in invalid state.  Will retry with new server invoker.");
            }

            ServerInvoker newServerInvoker = null;

            // try to get new server invoker if one exists
            ServerInvoker[] invokers = InvokerRegistry.getServerInvokers();
            if(invokers != null)
            {
               for(int x = 0; x < invokers.length; x++)
               {
                  ServerInvoker svrinvoker = invokers[x];
                  InvokerLocator svrlocator = svrinvoker.getLocator();
                  if(getLocator().equals(svrlocator))
                  {
                     newServerInvoker = svrinvoker;
                     break;
                  }
View Full Code Here

         {
            log.error("no invoker created: " + uri);
            success = false;
         }
        
         ServerInvoker serverInvoker = serverInvokers[0];
         String bindHost = serverInvoker.getServerBindAddress();
         int bindPort = serverInvoker.getServerBindPort();
        
         if (!expectedHost.equals(bindHost))
         {
            log.error("host (" + bindHost + ") != expected host (" + expectedHost);
            success = false;
View Full Code Here

         {
            log.error("no invoker created: " + uri);
            success = false;
         }
        
         ServerInvoker serverInvoker = serverInvokers[0];
         int maxNumThreadsOneWay = serverInvoker.getMaxNumberOfOnewayThreads();
         String returnedClassName = serverInvoker.getOnewayThreadPool().getClass().getName();
        
         if (maxNumThreadsOneWay != 3)
         {
            log.error("maxNumThreadsOneWay (" + maxNumThreadsOneWay + ") != expected value (" + 3);
            success = false;
View Full Code Here

   }

   public void testRegistryUpdate()
   {
      ServerInvoker[] serverInvokers = InvokerRegistry.getServerInvokers();
      ServerInvoker serverInvoker = serverInvokers[0];
      InvokerLocator locator = serverInvoker.getLocator();
      String locatorURI = locator.getLocatorURI();
      assertTrue("Invoker locator uri should have changed.", !this.locatorURI.equals(locatorURI));
   }
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

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.