org.apache.geronimo.connector
Class AdminObjectWrapper

java.lang.Object
  extended byorg.apache.geronimo.connector.AdminObjectWrapper
All Implemented Interfaces:
org.apache.geronimo.gbean.DynamicGBean, org.apache.geronimo.gbean.GBeanLifecycle

public class AdminObjectWrapper
extends Object
implements org.apache.geronimo.gbean.GBeanLifecycle, org.apache.geronimo.gbean.DynamicGBean

Wrapper around AdminObject that exposes its config-properties as GBeanAttributes and supplies a disconnectable proxy to bind in jndi.

Version:
$Revision: 1.11 $ $Date: 2004/07/12 06:07:50 $

Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
AdminObjectWrapper()
          Default constructor required when a class is used as a GBean Endpoint.
AdminObjectWrapper(Class adminObjectInterface, Class adminObjectClass, org.apache.geronimo.kernel.Kernel kernel, String objectName)
          Normal managed constructor.
 
Method Summary
 void doFail()
          GBean fail method.
 void doStart()
          GBean start method.
 void doStop()
          GBean stop method.
 Class getAdminObjectClass()
          Returns class of wrapped AdminObject.
 Object getAttribute(String name)
          Delegating DynamicGBean getAttribute method.
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 Object getMethodInterceptor()
          Returns the MethodInterceptor the proxy communicates with when connected.
 Object getProxy()
          Returns disconnectable proxy for binding in jndi.
 Object invoke(String name, Object[] arguments, String[] types)
          no-op DynamicGBean method
 void setAttribute(String name, Object value)
          Delegating DynamicGBean setAttribute method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

AdminObjectWrapper

public AdminObjectWrapper()
Default constructor required when a class is used as a GBean Endpoint.


AdminObjectWrapper

public AdminObjectWrapper(Class adminObjectInterface,
                          Class adminObjectClass,
                          org.apache.geronimo.kernel.Kernel kernel,
                          String objectName)
                   throws IllegalAccessException,
                          InstantiationException
Normal managed constructor.

Parameters:
adminObjectInterface - Interface the proxy will implement.
adminObjectClass - Class of admin object to be wrapped.
kernel - name is used so proxy can find correct kernel.
objectName - is used by proxy to find this gbean to reconnect to.
Throws:
IllegalAccessException
InstantiationException
Method Detail

getAdminObjectClass

public Class getAdminObjectClass()
Returns class of wrapped AdminObject.

Returns:
class of wrapped AdminObject

getProxy

public Object getProxy()
Returns disconnectable proxy for binding in jndi.

Returns:
proxy implementing adminObjectInterface.

getMethodInterceptor

public Object getMethodInterceptor()
Returns the MethodInterceptor the proxy communicates with when connected.

Returns:
MethodInterceptor the proxy calls.

doStart

public void doStart()
             throws org.apache.geronimo.gbean.WaitingException,
                    Exception
GBean start method.

Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doStop

public void doStop()
            throws org.apache.geronimo.gbean.WaitingException,
                   Exception
GBean stop method.

Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doFail

public void doFail()
GBean fail method.

Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

getAttribute

public Object getAttribute(String name)
                    throws Exception
Delegating DynamicGBean getAttribute method.

Specified by:
getAttribute in interface org.apache.geronimo.gbean.DynamicGBean
Parameters:
name - of attribute.
Returns:
attribute value.
Throws:
Exception

setAttribute

public void setAttribute(String name,
                         Object value)
                  throws Exception
Delegating DynamicGBean setAttribute method.

Specified by:
setAttribute in interface org.apache.geronimo.gbean.DynamicGBean
Parameters:
name - of attribute.
value - of attribute to be set.
Throws:
Exception

invoke

public Object invoke(String name,
                     Object[] arguments,
                     String[] types)
              throws Exception
no-op DynamicGBean method

Specified by:
invoke in interface org.apache.geronimo.gbean.DynamicGBean
Parameters:
name -
arguments -
types -
Returns:
nothing, there are no operations.
Throws:
Exception

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.