Package org.jboss.remoting.transport

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


      Connector connector = new Connector();
      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);
View Full Code Here


      serverConfig.put(Remoting.CUSTOM_SERVER_SOCKET_FACTORY, ssf);
      StaticTestListener.reset();
      String listenerClassName = StaticTestListener.class.getName();
      serverConfig.put(Remoting.SOCKET_CREATION_SERVER_LISTENER, listenerClassName);
      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

         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

      Connector connector = new Connector();
      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);
View Full Code Here

      Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais);
      Element element =  doc.getDocumentElement();
      connector.setConfiguration(element);
      try
      {
         connector.create();
         InvokerLocator expected = new InvokerLocator("socket://" + getLocalHost() + ":" + port + "/?timeout=10000");
         InvokerLocator actual = connector.getLocator();
         log.info("Expected: " + expected);
         log.info("Actual:   " + actual);InetAddress.getLocalHost();
         assertEquals(expected, actual);
View Full Code Here

         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("sample", new SampleInvocationHandler());
         connector.start();

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

      Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais);
      Element element =  doc.getDocumentElement();
      connector.setConfiguration(element);
      try
      {
         connector.create();
         InvokerLocator expected = new InvokerLocator("socket://" + fixHostnameForURL(host) + ":" + port + "/?timeout=10000");
         InvokerLocator actual = connector.getLocator();
         log.info("Expected: " + expected);
         log.info("Actual:   " + actual);
         assertEquals(expected, actual);
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

            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.addConnectionListener(new TestListener());
            connector.start();
            log.info("Connector started: " + connector.getInvokerLocator());
            Thread.sleep(5000);
View Full Code Here

         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("sample", new SampleInvocationHandler());
         connector.start();

         // Verify ServerSocketFactory is the one passed in config map.
         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.