Package org.jboss.remoting.transport

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


      assertTrue(client.getInvoker() instanceof BisocketClientInvoker);
     
      String callbackLocatorURI = getTransport() + "://" + host + ":1";
      config.put(Bisocket.IS_CALLBACK_SERVER, "true");
      Connector callbackConnector = new Connector(callbackLocatorURI, config);
      callbackConnector.start();
      SimpleCallbackHandler callbackHandler = new SimpleCallbackHandler();
      client.addListener(callbackHandler, new InvokerLocator(callbackLocatorURI));
      log.info("client added callback handler");
      client.invoke(CALLBACK_TEST);
      assertEquals(1, callbackHandler.callbackCounter);
View Full Code Here


      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

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

         Connector connector = new Connector();
         connector.setInvokerLocator(locator.getLocatorURI());
         ObjectName obj = new ObjectName("jboss.remoting:type=Connector,transport=" + locator.getProtocol());
         server.registerMBean(connector, obj);
         //connector.create();
         connector.start();

         Detector detector = null;
         ObjectName objName = null;

         if(type.equals(TYPE_MULTICAST))
View Full Code Here

      Connector marshallerConnector = null;
      try
      {
         marshallerConnector = new MarshallLoaderConnector();
         marshallerConnector.setInvokerLocator(locator.getLocatorURI());
         marshallerConnector.start();

         MarshallerLoaderHandler loader = new MarshallerLoaderHandler(repositories);
         marshallerConnector.addInvocationHandler("loader", loader);
        
         // Set after Connector.addInvocationHandler(), which also sets MBeanServer.
View Full Code Here

      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");
      TestListener listener1 = new TestListener();
      config.put(Remoting.SOCKET_CREATION_CLIENT_LISTENER, listener1);
View Full Code Here

      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();
      ObjectName objectName = new ObjectName(serverInvoker.getMBeanObjectName());
      assertTrue(objectName.getCanonicalName().indexOf(host) >= 0);
      assertTrue(server.isRegistered(objectName));
View Full Code Here

      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");
      Client client = new Client(locator, clientConfig);
      client.connect();
View Full Code Here

      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");
      TestListener listener3 = new TestListener();
      log.info("listener3: " + listener3);
View Full Code Here

         serverInvoker.setServerSocketFactory(ssf2);
         SocketFactory sf2 = getDefaultCallbackSocketFactory();
         serverInvoker.setSocketFactory(sf2);

         connector.addInvocationHandler("sample", new SampleInvocationHandler());
         connector.start();

         // Verify ServerSocketFactory is the one set in ServerInvoker.
         assertTrue(ssf2 == serverInvoker.getServerSocketFactory());
        
        
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.