Package org.jboss.remoting

Examples of org.jboss.remoting.ServerInvocationHandler


    * 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


      Iterator it = handlerMap.keySet().iterator();
      while (it.hasNext())
      {
         String subsystems = (String) it.next();
         Object value = handlerMap.get(subsystems);
         ServerInvocationHandler handler = null;
        
         if (value instanceof ServerInvocationHandler)
         {
            handler = (ServerInvocationHandler) value;
         }
View Full Code Here

         }

         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

     
      mbean = new RemotingJMXWrapper(locator);
      mbeanServer.registerMBean(mbean, objectName);
      mbeanServer.invoke(objectName, "start", new Object[0], new String[0]);
     
      ServerInvocationHandler handler = new JMSServerInvocationHandler();
     
      mbeanServer.invoke(objectName, "addInvocationHandler", new Object[]
      { ServerPeer.REMOTING_JMS_SUBSYSTEM, handler }, new String[]
      { "java.lang.String", "org.jboss.remoting.ServerInvocationHandler" });
     
View Full Code Here

         // Remove all callback handlers (if any ServerInvocationHandlers are registered).
         Iterator it = handlers.values().iterator();

         if (it.hasNext())
         {
            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

      connector = new Connector();
      connector.setInvokerLocator(locator.getLocatorURI());
      connector.create();

      ServerInvocationHandler invocationHandler = new Handler();
      connector.addInvocationHandler("stream", invocationHandler);

      connector.start();

   }
View Full Code Here

   public TransporterServer(InvokerLocator locator, Object target, String subsystem) throws Exception
   {
      connector = new Connector();
      connector.setInvokerLocator(locator.getLocatorURI());
      connector.create();
      ServerInvocationHandler handler = new TransporterHandler(target);
      connector.addInvocationHandler(subsystem, handler);
   }
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.