Package org.jboss.remoting.transport

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


      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.start();
     
      // Disable the server so that the client will need to create a new socket, and
      // so that the creation of the socket wrapper will fail.
View Full Code Here


     //Start a server
    
     Connector serverConnector = new Connector();
     InvokerLocator serverLocator = new InvokerLocator("multiplex://localhost:9099");
     serverConnector.setInvokerLocator(serverLocator.getLocatorURI());
     serverConnector.create();
     SimpleServerInvocationHandler invocationHandler = new SimpleServerInvocationHandler();
     serverConnector.addInvocationHandler("JMS", invocationHandler);
     serverConnector.start();
    
     log.info("Server started");
View Full Code Here

        Connector callbackServerConnector = new Connector();     
       
        InvokerLocator callbackServerLocator = new InvokerLocator("multiplex://localhost:" + localPort + "/?serverMultiplexId=mytestid");
       
        callbackServerConnector.setInvokerLocator(callbackServerLocator.getLocatorURI());     
        callbackServerConnector.create();     
        callbackServerConnector.start();
       
        log.info("Created callback server");
       
        client.connect();
View Full Code Here

   protected Connector getConnector(InvokerLocator locator, ServerInvocationHandler handler)
   throws Exception
   {
      Connector connector = new Connector(getConfiguration());
      connector.setInvokerLocator(locator.getLocatorURI());
      connector.create();
      connector.addInvocationHandler("sample", handler);
      return connector;
   }
  
  
View Full Code Here

      try
      {
         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";
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.start();
     
      // Disable the server so that the client will need to create a new socket, and
      // so that the creation of the socket wrapper will fail.
View Full Code Here

      InvokerLocator locator = new InvokerLocator(locatorURI);
      HashMap serverConfig = new HashMap();
      serverConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      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

      // Connection checking is no longer necessary since ClientSocketWrapper
      // implements OpenConnectionChecker.
//      serverConfig.put(SocketServerInvoker.CHECK_CONNECTION_KEY, "true");
      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

      public void run()
      {
         Connector connector = new Connector(serverLocatorURI);
         try
         {
            connector.create();
            connector.start();
            System.out.println("server started");
            ServerSocket ss = new ServerSocket(syncSocketPort);
            ss.accept();
            ss.close();
View Full Code Here

      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      config.put("bluemonkey", "diamond");
      Connector connector = new Connector(serverLocator, config);
      connector.preRegister(server, null);
      connector.create();
      connector.start();
     
      // Verify that the ServerInvoker has a reference to the MBeanServer
      ServerInvoker invoker = connector.getServerInvoker();
      assertNotNull(invoker);
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.