org.jboss.invocation.jrmp.server
Class JRMPProxyFactory

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.invocation.jrmp.server.JRMPProxyFactory
All Implemented Interfaces:
JRMPProxyFactoryMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)
Direct Known Subclasses:
ProxyFactoryHA (src)

public class JRMPProxyFactory
extends ServiceMBeanSupport (src)
implements JRMPProxyFactoryMBean (src)

Create an interface proxy that uses RMI/JRMP to communicate with the server side object that exposes the corresponding JMX invoke operation. Requests make through the proxy are sent to the JRMPInvoker instance the proxy is bound to.


Field Summary
protected  java.lang.Object theProxy
          The Proxy object which uses the proxy as its handler
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
JRMPProxyFactory()
           
 
Method Summary
protected  void createProxy(java.lang.Object cacheID, java.lang.String proxyBindingName, java.lang.ClassLoader loader, java.lang.Class[] ifaces)
           
protected  void destroyService()
          Sub-classes should override this method to provide custum 'destroy' logic.
 org.w3c.dom.Element getClientInterceptors()
          Get the proxy client side interceptor configuration
 java.lang.Class getExportedInterface()
          Get the RMI compatible interface that the JRMPInvokerProxy implements
 java.lang.Class[] getExportedInterfaces()
          Get the RMI compatible interface that the JRMPInvokerProxy implements
protected  java.util.ArrayList getInterceptorClasses()
           
 ObjectName (src) getInvokerName()
          Get the server side JRMPInvoker mbean that will be used as the RMI/JRMP transport handler.
 boolean getInvokeTargetMethod()
           
 java.lang.String getJndiName()
          Get the JNDI name under which the HttpInvokerProxy will be bound
 java.lang.Object getProxy()
          Get the proxy instance created by the factory.
 ObjectName (src) getTargetName()
          Get the server side mbean that exposes the invoke operation for the exported interface
 java.lang.Object invoke(Invocation (src)  mi)
           
protected  void rebind()
           
 void setClientInterceptors(org.w3c.dom.Element config)
          Set the proxy client side interceptor configuration
 void setExportedInterface(java.lang.Class exportedInterface)
          Set the RMI compatible interface that the JRMPInvokerProxy implements
 void setExportedInterfaces(java.lang.Class[] exportedInterfaces)
          Set the RMI compatible interface that the JRMPInvokerProxy implements
 void setInvokerName(ObjectName (src)  invokerName)
          Set the server side JRMPInvoker mbean that will be used as the RMI/JRMP transport handler.
 void setInvokeTargetMethod(boolean invokeTargetMethod)
           
 void setJndiName(java.lang.String jndiName)
          Set the JNDI name under which the HttpInvokerProxy will be bound
 void setTargetName(ObjectName (src)  targetName)
          Set the server side mbean that exposes the invoke operation for the exported interface
protected  void startService()
          Initializes the servlet.
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean (src)
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Field Detail

theProxy

protected java.lang.Object theProxy
The Proxy object which uses the proxy as its handler

Constructor Detail

JRMPProxyFactory

public JRMPProxyFactory()
Method Detail

getInvokerName

public ObjectName (src)  getInvokerName()
Description copied from interface: JRMPProxyFactoryMBean (src)
Get the server side JRMPInvoker mbean that will be used as the RMI/JRMP transport handler.

Specified by:
getInvokerName in interface JRMPProxyFactoryMBean (src)

setInvokerName

public void setInvokerName(ObjectName (src)  invokerName)
Description copied from interface: JRMPProxyFactoryMBean (src)
Set the server side JRMPInvoker mbean that will be used as the RMI/JRMP transport handler.

Specified by:
setInvokerName in interface JRMPProxyFactoryMBean (src)

getTargetName

public ObjectName (src)  getTargetName()
Description copied from interface: JRMPProxyFactoryMBean (src)
Get the server side mbean that exposes the invoke operation for the exported interface

Specified by:
getTargetName in interface JRMPProxyFactoryMBean (src)

setTargetName

public void setTargetName(ObjectName (src)  targetName)
Description copied from interface: JRMPProxyFactoryMBean (src)
Set the server side mbean that exposes the invoke operation for the exported interface

Specified by:
setTargetName in interface JRMPProxyFactoryMBean (src)

getJndiName

public java.lang.String getJndiName()
Description copied from interface: JRMPProxyFactoryMBean (src)
Get the JNDI name under which the HttpInvokerProxy will be bound

Specified by:
getJndiName in interface JRMPProxyFactoryMBean (src)

setJndiName

public void setJndiName(java.lang.String jndiName)
Description copied from interface: JRMPProxyFactoryMBean (src)
Set the JNDI name under which the HttpInvokerProxy will be bound

Specified by:
setJndiName in interface JRMPProxyFactoryMBean (src)

getExportedInterface

public java.lang.Class getExportedInterface()
Description copied from interface: JRMPProxyFactoryMBean (src)
Get the RMI compatible interface that the JRMPInvokerProxy implements

Specified by:
getExportedInterface in interface JRMPProxyFactoryMBean (src)

setExportedInterface

public void setExportedInterface(java.lang.Class exportedInterface)
Description copied from interface: JRMPProxyFactoryMBean (src)
Set the RMI compatible interface that the JRMPInvokerProxy implements

Specified by:
setExportedInterface in interface JRMPProxyFactoryMBean (src)

getExportedInterfaces

public java.lang.Class[] getExportedInterfaces()
Description copied from interface: JRMPProxyFactoryMBean (src)
Get the RMI compatible interface that the JRMPInvokerProxy implements

Specified by:
getExportedInterfaces in interface JRMPProxyFactoryMBean (src)

setExportedInterfaces

public void setExportedInterfaces(java.lang.Class[] exportedInterfaces)
Description copied from interface: JRMPProxyFactoryMBean (src)
Set the RMI compatible interface that the JRMPInvokerProxy implements

Specified by:
setExportedInterfaces in interface JRMPProxyFactoryMBean (src)

getInvokeTargetMethod

public boolean getInvokeTargetMethod()
Specified by:
getInvokeTargetMethod in interface JRMPProxyFactoryMBean (src)
Returns:
whether invocations go to the target method instead of invoke(Invocation mi)

setInvokeTargetMethod

public void setInvokeTargetMethod(boolean invokeTargetMethod)
Specified by:
setInvokeTargetMethod in interface JRMPProxyFactoryMBean (src)
Parameters:
invokeTargetMethod - whether invocations should go to the target method instead of invoke(Invocation mi)

getClientInterceptors

public org.w3c.dom.Element getClientInterceptors()
Description copied from interface: JRMPProxyFactoryMBean (src)
Get the proxy client side interceptor configuration

Specified by:
getClientInterceptors in interface JRMPProxyFactoryMBean (src)
Returns:
the proxy client side interceptor configuration

setClientInterceptors

public void setClientInterceptors(org.w3c.dom.Element config)
                           throws java.lang.Exception
Description copied from interface: JRMPProxyFactoryMBean (src)
Set the proxy client side interceptor configuration

Specified by:
setClientInterceptors in interface JRMPProxyFactoryMBean (src)
Parameters:
config - the proxy client side interceptor configuration
Throws:
java.lang.Exception

getProxy

public java.lang.Object getProxy()
Description copied from interface: JRMPProxyFactoryMBean (src)
Get the proxy instance created by the factory.

Specified by:
getProxy in interface JRMPProxyFactoryMBean (src)

invoke

public java.lang.Object invoke(Invocation (src)  mi)
                        throws java.lang.Exception
Specified by:
invoke in interface JRMPProxyFactoryMBean (src)
Throws:
java.lang.Exception

startService

protected void startService()
                     throws java.lang.Exception
Initializes the servlet.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

destroyService

protected void destroyService()
                       throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'destroy' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
destroyService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

createProxy

protected void createProxy(java.lang.Object cacheID,
                           java.lang.String proxyBindingName,
                           java.lang.ClassLoader loader,
                           java.lang.Class[] ifaces)

rebind

protected void rebind()
               throws java.lang.Exception
Throws:
java.lang.Exception

getInterceptorClasses

protected java.util.ArrayList getInterceptorClasses()