Package org.jboss.remoting.transport

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


      ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());
      Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais);
      Element element =  doc.getDocumentElement();
      connector.setConfiguration(element);
      connector.create();
      connector.start();

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


         Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais);
         connector.setConfiguration(xml.getDocumentElement());
        
         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());
        
View Full Code Here

         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";
         client.addListener(callbackHandler, callbackLocator, callbackHandleObject);
        
View Full Code Here

            addServerConfig(serverConfig);
            final Connector connector = new Connector(locator, serverConfig);
            connector.create();
            connector.addInvocationHandler("test", new TestHandler());
            connector.addConnectionListener(new TestListener());
            connector.start();
            log.info("Connector started: " + connector.getInvokerLocator());
            Thread.sleep(5000);
            connector.stop();
            log.info("Connector stopped: " + connector.getInvokerLocator());
         }
View Full Code Here

         Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais);
         connector.setConfiguration(xml.getDocumentElement());
        
         connector.create();
         connector.addInvocationHandler("sample", new SampleInvocationHandler());
         connector.start();

         // Verify ServerSocketFactory is the one passed in config map.
         ServerInvoker serverInvoker = connector.getServerInvoker();
         assertTrue(getUniqueServerSocketFactoryClass() ==
                    serverInvoker.getServerSocketFactory().getClass());
View Full Code Here

         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";
         client.addListener(callbackHandler, callbackLocator, callbackHandleObject);
        
View Full Code Here

         int freeport = PortUtil.findFreePort(getHostName());
         InvokerLocator locator = new InvokerLocator(getTransport() + "://" + getHostName() + ":" + freeport);
         Connector connector = new Connector(locator, sconfig);
         connector.create();
         connector.addInvocationHandler("sample", new SampleInvocationHandler());
         connector.start();

         // Verify ServerSocketFactory is the one passed in config map.
         ServerInvoker serverInvoker = connector.getServerInvoker();
         assertTrue(getUniqueServerSocketFactoryClass() ==
                    serverInvoker.getServerSocketFactory().getClass());
View Full Code Here

         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";
         client.addListener(callbackHandler, callbackLocator, callbackHandleObject);
        
View Full Code Here

                  }
                  connectors.add(callbackServerConnector);
                  callbackConnectors.put(callbackhandler, connectors);
               }

               callbackServerConnector.start();
               // have to use the locator from the server as can be modified internally
               callbackLocator = callbackServerConnector.getServerInvoker().getLocator();
               addCallbackListener(callbackhandler, metadata, callbackLocator, callbackHandlerObject);
            }
            else
View Full Code Here

      Client client = new Client(locator);


      try
      {
         connector.start();
         client.connect();

         SocketClientInvoker invoker = (SocketClientInvoker)client.getInvoker();

         assertEquals(callRetries, invoker.getNumberOfCallRetries());
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.