Package org.jboss.remoting.transport

Examples of org.jboss.remoting.transport.Connector


      log.info("Starting remoting server with locator uri of: " + locatorURI);
      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      config.put(Bisocket.SECONDARY_BIND_PORT, Integer.toString(PORT));
      addExtraServerConfig(config);
      connector = new Connector(serverLocator, config);
      connector.create();
      invocationHandler = new TestInvocationHandler();
      connector.addInvocationHandler("sample", invocationHandler);
      connector.start();
     
View Full Code Here


      serverLocator = new InvokerLocator(locatorURI);
      log.info("Starting remoting server with locator uri of: " + locatorURI);
      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraServerConfig(config);
      connector = new Connector(serverLocator, config);
      connector.create();
      assertTrue(connector.getServerInvoker() instanceof BisocketServerInvoker);
      BisocketServerInvoker serverInvoker = (BisocketServerInvoker) connector.getServerInvoker();
      serverInvoker.setSecondaryBindPort(PORT);
      invocationHandler = new TestInvocationHandler();
View Full Code Here

      int PORT = PortUtil.findFreePort(host);
      port = PortUtil.findFreePort(host);
      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraServerConfig(config);
      connector = new Connector(config);
     
      // Create and set xml configuration document.
      StringBuffer buf = new StringBuffer();
      buf.append("<?xml version=\"1.0\"?>\n");
      buf.append("<config>");
View Full Code Here

      log.info("Starting remoting server with locator uri of: " + locatorURI);
      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      config.put(Bisocket.SECONDARY_CONNECT_PORT, Integer.toString(PORT));
      addExtraServerConfig(config);
      connector = new Connector(serverLocator, config);
      connector.create();
      invocationHandler = new TestInvocationHandler();
      connector.addInvocationHandler("sample", invocationHandler);
      connector.start();
     
View Full Code Here

         //SocketServerInvoker invokerSvr = new SocketServerInvoker(clsLoader, locator);
         //ObjectName objName = new ObjectName("jboss.remoting:type=SocketServerInvoker");
         //server.registerMBean(invokerSvr, objName);
         //invokerSvr.start();

         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

    * @param mbeanServer
    * @return
    */
   public static Connector createMarshallLoader(InvokerLocator locator, List repositories, MBeanServer mbeanServer)
   {
      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.
         loader.setMBeanServer(mbeanServer);
      }
      catch(Exception e)
      {
         log.error("Can not create marshaller loader.", e);
         if(marshallerConnector != null)
         {
            try
            {
               marshallerConnector.stop();
               marshallerConnector.destroy();
            }
            catch(Exception e1)
            {
               log.error("Error cleaning up marshaller loader connector.", e1);
            }
View Full Code Here

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

      serverLocator = new InvokerLocator(locatorURI);
      log.info("Starting remoting server with locator uri of: " + locatorURI);
      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraServerConfig(config);
      connector = new Connector(serverLocator, config);
      connector.create();
      invocationHandler = new TestInvocationHandler();
      connector.addInvocationHandler("sample", invocationHandler);
      connector.start();
     
View Full Code Here

      serverLocator = new InvokerLocator(locatorURI);
      log.info("Starting remoting server with locator uri of: " + locatorURI);
      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraServerConfig(config);
      connector = new Connector(serverLocator, config);
      connector.create();
      invocationHandler = new TestInvocationHandler();
      connector.addInvocationHandler("test", invocationHandler);
      connector.start();
   }
View Full Code Here

   {
      String host = InetAddress.getLocalHost().getHostAddress();
      String locatorURI = transport + "://" + host + ":" + port;
      InvokerLocator locator = new InvokerLocator(locatorURI);
      HashMap serverConfig = new HashMap();
      connector = new Connector(locator, serverConfig);
      connector.create();
      connector.setLeasePeriod(1000);
      connector.addInvocationHandler("test", new TestHandler());
      connector.addConnectionListener(new TestListener());
      connector.start();
View Full Code Here

TOP

Related Classes of org.jboss.remoting.transport.Connector

Copyright © 2018 www.massapicom. 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.