Package org.jboss.remoting

Examples of org.jboss.remoting.ServerInvocationHandler


            }

            String handlerClass = node.getFirstChild().getNodeValue();

            boolean isObjName = false;
            ServerInvocationHandler handler = null;

            //first check to see if this is an ObjectName
            try
            {
               ObjectName objName = new ObjectName(handlerClass);
View Full Code Here


      }
   }

   private ServerInvocationHandler createHandlerProxy(ObjectName objName)
   {
      ServerInvocationHandler handler;
      if(server != null)
      {
         handler = (ServerInvocationHandler)
               MBeanServerInvocationHandler.newProxyInstance(server,
                                                             objName,
View Full Code Here

    * description = "The ServerInvocationHandler MBean we are registering
    * for the subsystem"
    */
   public ServerInvocationHandler addInvocationHandler(String subsystem, ObjectName handlerObjectName) throws Exception
   {
      ServerInvocationHandler invocationHandler = createHandlerProxy(handlerObjectName);
      return addInvocationHandler(subsystem, invocationHandler);
   }
View Full Code Here

    * type        = "java.lang.String"
    * description = "The subsystem this handler is for."
    */
   public void removeInvocationHandler(String subsystem) throws Exception
   {
      ServerInvocationHandler handler = invoker.removeInvocationHandler(subsystem);

      if(handler != null)
      {
         handler.setMBeanServer(null);
      }
   }
View Full Code Here

      System.out.println("Starting remoting server with locator uri of: " + locatorURI);
      connector = new Connector();
      connector.setInvokerLocator(locator.getLocatorURI());
      connector.create();

      ServerInvocationHandler handler = new SampleInvocationHandler();
      connector.addInvocationHandler("test", handler);
      connector.start();
   }
View Full Code Here

      int id1 = 1;
      int id2 = 2;

      Connector connector1 = setupServer(locator1, mbeanServer);
      SampleInvocationHandler invocationHandler1 = new SampleInvocationHandler(id1);
      ServerInvocationHandler previous = connector1.addInvocationHandler("sub1", invocationHandler1);

      assertNull(previous);

      SampleInvocationHandler invocationHandler2 = new SampleInvocationHandler(id2);
      previous = connector1.addInvocationHandler("sub1", invocationHandler2);
View Full Code Here

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

         Iterator it = handlers.values().iterator();
        
         if (it.hasNext())
         {
            log.debug("removing callback handlers");
            ServerInvocationHandler defaultHandler = (ServerInvocationHandler) it.next();
            ServerInvocationHandler handler = null;
            ServerInvokerCallbackHandler callbackHandler = null;
            it = callbackHandlers.values().iterator();
           
            while (it.hasNext())
            {
               callbackHandler = (ServerInvokerCallbackHandler) it.next();
               String subsystem = callbackHandler.getSubsystem();
              
               if (subsystem == null)
                  handler = defaultHandler;
               else
                  handler = (ServerInvocationHandler) handlers.get(subsystem.toUpperCase());
              
               handler.removeListener(callbackHandler);
            }
         }
      }
      else
      {
View Full Code Here

   public void testJavaInvocation() throws Throwable
   {
      InvokerLocator locator = new InvokerLocator("rmi://localhost:5400/?" +
                                                  InvokerLocator.BYVALUE + "=" + Boolean.TRUE.toString());
      ServerInvocationHandler invocationHandler = new MockServerInvocationHandler();

      try
      {
         // set up
         setupConfiguration(locator, invocationHandler);
View Full Code Here

   public void testJBossInvocation() throws Throwable
   {
      InvokerLocator locator = new InvokerLocator("rmi://localhost:5401/?" +
                                                  InvokerLocator.BYVALUE + "=" + Boolean.TRUE.toString() + "&" +
                                                  InvokerLocator.SERIALIZATIONTYPE + "=" + "jboss");
      ServerInvocationHandler invocationHandler = new MockServerInvocationHandler();

      try
      {
         // set up
         setupConfiguration(locator, invocationHandler);
View Full Code Here

TOP

Related Classes of org.jboss.remoting.ServerInvocationHandler

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.