org.backsource.axis
Class MBeanProxyProvider

java.lang.Object
  extended byorg.apache.axis.handlers.BasicHandler
      extended byorg.apache.axis.providers.BasicProvider
          extended byorg.apache.axis.providers.java.JavaProvider
              extended byorg.apache.axis.providers.java.RPCProvider
                  extended byorg.backsource.axis.MBeanProxyProvider
All Implemented Interfaces:
org.apache.axis.Handler, java.io.Serializable

public class MBeanProxyProvider
extends org.apache.axis.providers.java.RPCProvider

An axis mbean invoker provider.

This may be used as an Axis provider/handler to delegate the incomming soap request to an MBean given by the service propery ObjectName. An interface class must also be specifyed, since a proxy to the mbean is create with that interface, and since all operations are basically done through introspection.

Currently it is possible to use this hanlder both for RPC and message style invocations. Here is a minimal configuration for an rpc service:

   <service name="DeliverEvents" provider="Handler">
          <parameter name="handlerClass" value="org.backsource.axis.MBeanProxyProvider"/>
          <parameter name="ObjectName" value="ProtocolHandler:handlerName=vvWs"/>
          <parameter name="InterfaceName" value="org.backsource.amsterdam.plugins.axis.AxisEntrance"/>
          <parameter name="allowedMethods" value="handleMessage"/>
        </service>

And here is one with a message style:

   <service name="DeliverDocument" style="message" provider="Handler">
          <parameter name="handlerClass" value="org.backsource.axis.MBeanProxyProvider"/>
          <parameter name="ObjectName" value="ProtocolHandler:handlerName=vvWs"/>
          <parameter name="InterfaceName" value="org.backsource.amsterdam.plugins.axis.AxisEntrance"/>
          <parameter name="allowedMethods" value="handleDocument"/>

        </service>

Version:
$Revision: 1.1.1.1 $
Author:
Peter Antman
See Also:
Serialized Form

Field Summary
protected  org.apache.axis.providers.java.JavaProvider delegate
           
protected  javax.management.MBeanInfo info
          stores meta-data about mbean
protected  boolean initialized
          whether this provider has been already initialized
protected  java.lang.Class intfClass
           
protected  javax.management.ObjectName name
          the objectName which we are running into
protected  javax.management.MBeanServer server
          the server which we are tight to
protected  java.lang.Object targetObject
           
 
Fields inherited from class org.apache.axis.providers.java.RPCProvider
log
 
Fields inherited from class org.apache.axis.providers.java.JavaProvider
entLog, OPTION_ALLOWEDMETHODS, OPTION_CLASSNAME, OPTION_CLASSPATH, OPTION_IS_STATIC, OPTION_SCOPE, OPTION_WSDL_INPUTSCHEMA, OPTION_WSDL_PORTTYPE, OPTION_WSDL_SERVICEELEMENT, OPTION_WSDL_SERVICEPORT, OPTION_WSDL_TARGETNAMESPACE
 
Fields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, options
 
Constructor Summary
MBeanProxyProvider()
           
 
Method Summary
protected  java.lang.ClassLoader getClassLoader(org.apache.axis.MessageContext msgContext)
           
protected  java.lang.Class getServiceClass(org.apache.axis.MessageContext msgContext, java.lang.String clsName)
           
protected  java.lang.String getServiceClassName(org.apache.axis.Handler service)
          Return the class name of the service
 void initServiceDesc(org.apache.axis.handlers.soap.SOAPService service, org.apache.axis.MessageContext msgCtx)
          initialize the meta-data
protected  java.lang.Object makeNewServiceObject(org.apache.axis.MessageContext msgContext, java.lang.String clsName)
           
 void processMessage(org.apache.axis.MessageContext msgContext, org.apache.axis.message.SOAPEnvelope reqEnv, org.apache.axis.message.SOAPEnvelope resEnv, java.lang.Object obj)
           
 
Methods inherited from class org.apache.axis.providers.java.RPCProvider
checkMethodName, invokeMethod
 
Methods inherited from class org.apache.axis.providers.java.JavaProvider
generateWSDL, getServiceClass, getServiceClassNameOptionName, getServiceObject, invoke
 
Methods inherited from class org.apache.axis.providers.BasicProvider
addOperation, getOperationName, getOperationNames, getOperationQNames
 
Methods inherited from class org.apache.axis.handlers.BasicHandler
canHandleBlock, cleanup, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

info

protected javax.management.MBeanInfo info
stores meta-data about mbean


server

protected javax.management.MBeanServer server
the server which we are tight to


name

protected javax.management.ObjectName name
the objectName which we are running into


initialized

protected boolean initialized
whether this provider has been already initialized


intfClass

protected java.lang.Class intfClass

targetObject

protected java.lang.Object targetObject

delegate

protected org.apache.axis.providers.java.JavaProvider delegate
Constructor Detail

MBeanProxyProvider

public MBeanProxyProvider()
Method Detail

initServiceDesc

public void initServiceDesc(org.apache.axis.handlers.soap.SOAPService service,
                            org.apache.axis.MessageContext msgCtx)
                     throws org.apache.axis.AxisFault
initialize the meta-data

Throws:
org.apache.axis.AxisFault
See Also:
1.0

processMessage

public void processMessage(org.apache.axis.MessageContext msgContext,
                           org.apache.axis.message.SOAPEnvelope reqEnv,
                           org.apache.axis.message.SOAPEnvelope resEnv,
                           java.lang.Object obj)
                    throws java.lang.Exception
Throws:
java.lang.Exception

makeNewServiceObject

protected java.lang.Object makeNewServiceObject(org.apache.axis.MessageContext msgContext,
                                                java.lang.String clsName)

getServiceClassName

protected java.lang.String getServiceClassName(org.apache.axis.Handler service)
Return the class name of the service


getServiceClass

protected java.lang.Class getServiceClass(org.apache.axis.MessageContext msgContext,
                                          java.lang.String clsName)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getClassLoader

protected java.lang.ClassLoader getClassLoader(org.apache.axis.MessageContext msgContext)


Copyright © 2003-2004 Backsource. All Rights Reserved.