Package org.jboss.remoting.transport

Examples of org.jboss.remoting.transport.Connector.start()


      serverConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      Connector connector = new Connector(locator, serverConfig);
      connector.create();
      TestHandler handler = new TestHandler();
      connector.addInvocationHandler("test", handler);
      connector.start();
     
      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      clientConfig.put(MicroSocketClientInvoker.MAX_POOL_SIZE_FLAG, Integer.toString(MAX_POOL_SIZE));
      Client client = new Client(locator, clientConfig);
View Full Code Here


      serverConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      Connector connector = new Connector(locator, serverConfig);
      connector.create();
      TestHandler handler = new TestHandler();
      connector.addInvocationHandler("test", handler);
      connector.start();
     
      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      clientConfig.put(MicroSocketClientInvoker.MAX_POOL_SIZE_FLAG, Integer.toString(MAX_POOL_SIZE));
      Client client = new Client(locator, clientConfig);
View Full Code Here

      serverConfig.put(Bisocket.IS_CALLBACK_SERVER, "false");
      Connector connector = new Connector(serverLocator, serverConfig);
      connector.create();
      SampleInvocationHandler invocationHandler = new SampleInvocationHandler();
      connector.addInvocationHandler("sample", invocationHandler);
      connector.start();
      log.info("Started remoting server with locator uri of: " + locatorURI);
     
      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      clientConfig.put(Bisocket.IS_CALLBACK_SERVER, "true");
View Full Code Here

      config.put(InvokerLocator.FORCE_REMOTE, "true");
      config.put("bluemonkey", "diamond");
      Connector connector = new Connector(serverLocator, config);
      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());
View Full Code Here

         config.put(Bisocket.IS_CALLBACK_SERVER, "true");
         Connector callbackConnector = new Connector(locator.getLocatorURI(), config);
         callbackConnector.setServerSocketFactory(createServerSocketFactory());
         callbackConnector.create();
         callbackConnector.addInvocationHandler("sample", new SampleInvocationHandler());
         callbackConnector.start();

         CallbackHandler callbackHandler = new CallbackHandler();
         String callbackHandleObject = "myCallbackHandleObject";
         client.addListener(callbackHandler, locator, callbackHandleObject);
         solicitCallback("abc");
View Full Code Here

      HashMap serverConfig = new HashMap();
      addServerConfig(serverConfig);
      final Connector connector = new Connector(locator, serverConfig);
      connector.create();
      connector.addInvocationHandler("test", new TestHandler());
      connector.start();
     
      // Disable the server so that the client will need to create a new socket, and
      // so that the creation of the socket wrapper will fail.
      new Thread()
      {
View Full Code Here

         Connector connector = new Connector();
         connector.setInvokerLocator(connectorLocator.getLocatorURI());
         connector.create();
         SimpleServerInvocationHandler invocationHandler = new SimpleServerInvocationHandler();
         connector.addInvocationHandler("test", invocationHandler);
         connector.start();
        
         // Create Client.
         Map configuration = new HashMap();
         configuration.put(Multiplex.MULTIPLEX_BIND_HOST, "localhost");
         configuration.put(Multiplex.MULTIPLEX_BIND_PORT, "6565");
View Full Code Here

      {
         int freePort = PortUtil.findFreePort("localhost");
         String callbackURI = "multiplex://localhost:" + freePort;
         callbackURI += "/?serverMultiplexId=id";
         Connector callbackConnector = new Connector(callbackURI);
         callbackConnector.start();

         assertTrue(callbackConnector.isStarted());
         assertFalse(callbackConnector.getServerInvoker().isStarted());
         assertTrue(MultiplexServerInvoker.getSocketGroupMap().containsKey("id"));
         AddressPair addressPair = new AddressPair("localhost", connectPort, "localhost", freePort);
View Full Code Here

      {
         int freePort = PortUtil.findFreePort("localhost");
         String callbackURI = "multiplex://localhost:" + freePort;
         callbackURI += "/?serverMultiplexId=id&multiplexConnectHost=localhost&multiplexConnectPort=" + connectPort;
         Connector callbackConnector = new Connector(callbackURI);
         callbackConnector.start();

         assertTrue(callbackConnector.isStarted());
         assertTrue(callbackConnector.getServerInvoker().isStarted());
         assertTrue(MultiplexServerInvoker.getSocketGroupMap().containsKey("id"));
         AddressPair addressPair = new AddressPair("localhost", connectPort, "localhost", freePort);
View Full Code Here

         int freePort = PortUtil.findFreePort("localhost");
         String callbackURI = "multiplex://localhost:" + freePort;
         callbackURI += "/?serverMultiplexId=id&multiplexConnectHost=localhost&multiplexConnectPort=" + connectPort;
         Connector callbackConnector1 = new Connector(callbackURI);
        
         callbackConnector1.start();
         assertTrue(callbackConnector1.isStarted());
         assertTrue(MultiplexServerInvoker.getSocketGroupMap().containsKey("id"));
         AddressPair addressPair = new AddressPair("localhost", connectPort, "localhost", freePort);
         assertTrue(MultiplexServerInvoker.getAddressPairMap().containsKey(addressPair));
        
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.