Package org.jboss.remoting.transport

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


      TestListener listener1 = new TestListener();
      serverConfig.put(Remoting.SOCKET_CREATION_SERVER_LISTENER, listener1);
      TestListener listener2 = new TestListener();
      serverConfig.put(Remoting.SOCKET_CREATION_CLIENT_LISTENER, listener2);
      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


      TestListener listener2 = new TestListener();
      log.info("listener2: " + listener2);
      serverConfig.put(Remoting.SOCKET_CREATION_CLIENT_LISTENER, listener2);
      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

         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();
        
         // Set ServerSocketFactory and SocketFactory in ServerInvoker.
         ServerInvoker serverInvoker = connector.getServerInvoker();
         ServerSocketFactory ssf2 = getDefaultServerSocketFactory();
         serverInvoker.setServerSocketFactory(ssf2);
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

         HashMap config = new HashMap();
         addExtraCallbackConfig(config);
         Connector callbackConnector = new Connector(callbackLocator.getLocatorURI(), config);
         ServerSocketFactory ssf3 = getDefaultCallbackServerSocketFactory();
         callbackConnector.setServerSocketFactory(ssf3);
         callbackConnector.create();
         callbackConnector.addInvocationHandler("sample", new SampleInvocationHandler());
         callbackConnector.start();
        
         CallbackHandler callbackHandler = new CallbackHandler();
         String callbackHandleObject = "myCallbackHandleObject";
View Full Code Here

   {
      System.setProperty(InvokerLocator.BIND_BY_HOST, "true");
      String locatorUrl = "socket://0.0.0.0:5600";

      Connector connector = new Connector(locatorUrl);
      connector.create();
      connector.start();

      // Verify that the InvokerLocator host is set properly.
      String connectorLocatorUrl = connector.getInvokerLocator();
      System.out.println("connector locator = " + connectorLocatorUrl);
View Full Code Here

      ServerSocketFactory ssf = getServerSocketFactory();
      serverConfig.put(Remoting.CUSTOM_SERVER_SOCKET_FACTORY, ssf);
      FailingTestListener listener = new FailingTestListener();
      serverConfig.put(Remoting.SOCKET_CREATION_SERVER_LISTENER, listener);
      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

   {
      System.setProperty(InvokerLocator.BIND_BY_HOST, "false");
      String locatorUrl = "socket://0.0.0.0:5600";

      Connector connector = new Connector(locatorUrl);
      connector.create();
      connector.start();

      // Verify that the InvokerLocator host is set properly.
      String connectorLocatorUrl = connector.getInvokerLocator();
      System.out.println("connector locator = " + connectorLocatorUrl);
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

         // Set ServerSocketFactory and SocketFactory in Connector.
         ServerSocketFactory ssf2 = getDefaultServerSocketFactory();
         connector.setServerSocketFactory(ssf2);
         SocketFactory sf2 = getDefaultCallbackSocketFactory();
         connector.setSocketFactory(sf2);
         connector.create();
         connector.addInvocationHandler("sample", new SampleInvocationHandler());
         connector.start();
        
         // Verify ServerSocketFactory is the one set in Connector.
         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.