Package org.jboss.remoting.transport

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


      // Start the target server
      InvokerLocator targetServerLocator = new InvokerLocator("socket://localhost:3456");
      Connector connector = new Connector();
      connector.setInvokerLocator(targetServerLocator.getLocatorURI());
      connector.create();
      connector.addInvocationHandler("MySubsystem", new ServerInvocationHandlerImpl());
      connector.start();


      Client client = new Client(targetServerLocator);
View Full Code Here


      InvokerLocator locator = new InvokerLocator(locatorURI);
      HashMap serverConfig = new HashMap();
      serverConfig.put(ServerInvoker.MAX_NUM_ONEWAY_THREADS_KEY, "100");
      serverConfig.put(ServerInvoker.MAX_ONEWAY_THREAD_POOL_QUEUE_SIZE, "100");
      Connector connector = new Connector(locator, serverConfig);
      connector.create();
      TestHandler handler = new TestHandler();
      connector.addInvocationHandler("test", handler);
      connector.start();
     
      HashMap clientConfig = new HashMap();
View Full Code Here

      InvokerLocator locator = new InvokerLocator(locatorURI);
      HashMap serverConfig = new HashMap();
      serverConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraServerConfig(serverConfig);
      Connector connector = new Connector(locator, serverConfig);
      connector.create();
      connector.addInvocationHandler("test", new TestHandler());
      connector.start();
     
      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
View Full Code Here

      // Connection checking is no longer necessary since ClientSocketWrapper
      // implements OpenConnectionChecker.
//      serverConfig.put(SocketServerInvoker.CHECK_CONNECTION_KEY, "true");
      addExtraServerConfig(serverConfig);
      Connector connector = new Connector(locator, serverConfig);
      connector.create();
      connector.addInvocationHandler("test", new TestHandler());
      connector.start();
     
      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
View Full Code Here

      String locatorURI = getTransport() + "://" + host + ":" + port;
      InvokerLocator locator = new InvokerLocator(locatorURI);
      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.
View Full Code Here

      log.info("Starting remoting server with locator uri of: " + locatorURI);
      HashMap serverConfig = new HashMap();
      serverConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      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);
     
View Full Code Here

      buf.append("   </invoker>");
      buf.append("</config>");
      ByteArrayInputStream bais = new ByteArrayInputStream(buf.toString().getBytes());
      Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais);
      connector.setConfiguration(xml.getDocumentElement());
      connector.create();
      connector.addInvocationHandler("test", new TestInvocationHandler());
      connector.start();
      locatorURI = connector.getInvokerLocator();
      log.info("Started remoting server with locator uri of: " + locatorURI);
   }
View Full Code Here

      try
      {
         InvokerLocator locator = new InvokerLocator(getTransport() + "://localhost:" + callbackPort);
         Connector callbackConnector = new Connector(locator.getLocatorURI());
         callbackConnector.setServerSocketFactory(createServerSocketFactory());
         callbackConnector.create();
         callbackConnector.addInvocationHandler("sample", new SampleInvocationHandler());
         callbackConnector.start();

         CallbackHandler callbackHandler = new CallbackHandler();
         String callbackHandleObject = "myCallbackHandleObject";
View Full Code Here

      String host = InetAddress.getLocalHost().getHostAddress();
      int port = PortUtil.findFreePort(host);
      String locatorURI = getTransport() + "://" + host + ":" + port;
      InvokerLocator locator = new InvokerLocator(locatorURI);
      Connector connector = new Connector(locator);
      connector.create();
      connector.addInvocationHandler("test", new TestHandler());
      connector.start();
     
      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
View Full Code Here

      locatorURI = getTransport() + "://" + host + ":" + port;
      serverLocator = new InvokerLocator(locatorURI);
      connector.setInvokerLocator(locatorURI);
      ObjectName obj = new ObjectName("jboss.remoting:type=Connector,transport=" + getTransport());
      server.registerMBean(connector, obj);
      connector.create();
      invocationHandler = new TestInvocationHandler();
      connector.addInvocationHandler("test", invocationHandler);
      connector.start();
     
      ServerInvoker serverInvoker = connector.getServerInvoker();
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.