org.apache.geronimo.connector
Class AdminObjectWrapper

java.lang.Object
  extended by org.apache.geronimo.connector.AdminObjectWrapper
All Implemented Interfaces:
AdminObjectSource, DynamicGBean, JCAAdminObject, J2EEManagedObject

public class AdminObjectWrapper
extends Object
implements DynamicGBean, JCAAdminObject, AdminObjectSource

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


Constructor Summary
AdminObjectWrapper()
          Default constructor required when a class is used as a GBean Endpoint.
AdminObjectWrapper(String adminObjectInterface, String adminObjectClass, Kernel kernel, AbstractName abstractName, String objectName, ClassLoader cl)
          Normal managed constructor.
 
Method Summary
 Object $getResource()
          Returns disconnectable proxy for binding in jndi.
 String getAdminObjectClass()
          Returns class of wrapped AdminObject.
 String getAdminObjectInterface()
           
 Object getAttribute(String name)
          Delegating DynamicGBean getAttribute method.
 Map getConfigProperties()
          Gets the config properties in the form of a map where the key is the property name and the value is property type (as a String not a Class).
 Object getConfigProperty(String property)
           
 String getObjectName()
          Gets the unique name of this object.
 Object invoke(String name, Object[] arguments, String[] types)
          no-op DynamicGBean method
 boolean isEventProvider()
          Determines if this object implemnts the event provider type defined in the J2EE Management specification.
 boolean isStateManageable()
          Determines if this object implements the state manageable type defined in the J2EE Management specification.
 boolean isStatisticsProvider()
          Determines if this object implemnts the statistics provider type defined in the J2EE Management specification.
 void setAttribute(String name, Object value)
          Delegating DynamicGBean setAttribute method.
 void setConfigProperty(String property, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminObjectWrapper

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


AdminObjectWrapper

public AdminObjectWrapper(String adminObjectInterface,
                          String adminObjectClass,
                          Kernel kernel,
                          AbstractName abstractName,
                          String objectName,
                          ClassLoader cl)
                   throws IllegalAccessException,
                          InstantiationException,
                          ClassNotFoundException
Normal managed constructor.

Parameters:
adminObjectInterface - Interface the proxy will implement.
adminObjectClass - Class of admin object to be wrapped.
Throws:
IllegalAccessException
InstantiationException
ClassNotFoundException
Method Detail

getAdminObjectInterface

public String getAdminObjectInterface()
Specified by:
getAdminObjectInterface in interface JCAAdminObject

getAdminObjectClass

public String getAdminObjectClass()
Returns class of wrapped AdminObject.

Specified by:
getAdminObjectClass in interface JCAAdminObject
Returns:
class of wrapped AdminObject

$getResource

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

Specified by:
$getResource in interface AdminObjectSource
Returns:
proxy implementing adminObjectInterface.

getAttribute

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

Specified by:
getAttribute in interface 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 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 DynamicGBean
Parameters:
name -
arguments -
types -
Returns:
nothing, there are no operations.
Throws:
Exception

getConfigProperties

public Map getConfigProperties()
Gets the config properties in the form of a map where the key is the property name and the value is property type (as a String not a Class).

Specified by:
getConfigProperties in interface JCAAdminObject

setConfigProperty

public void setConfigProperty(String property,
                              Object value)
                       throws Exception
Specified by:
setConfigProperty in interface JCAAdminObject
Throws:
Exception

getConfigProperty

public Object getConfigProperty(String property)
                         throws Exception
Specified by:
getConfigProperty in interface JCAAdminObject
Throws:
Exception

getObjectName

public String getObjectName()
Description copied from interface: J2EEManagedObject
Gets the unique name of this object. The object name must comply with the ObjectName specification in the JMX specification and the restrictions in the J2EEManagementInterface.

Specified by:
getObjectName in interface J2EEManagedObject
Returns:
the unique name of this object within the server

isStateManageable

public boolean isStateManageable()
Description copied from interface: J2EEManagedObject
Determines if this object implements the state manageable type defined in the J2EE Management specification.

Specified by:
isStateManageable in interface J2EEManagedObject
Returns:
true if this class also implements the state manageable type; false otherwise

isStatisticsProvider

public boolean isStatisticsProvider()
Description copied from interface: J2EEManagedObject
Determines if this object implemnts the statistics provider type defined in the J2EE Management specification.

Specified by:
isStatisticsProvider in interface J2EEManagedObject
Returns:
true if this class also implements the statistics provider type; false otherwise

isEventProvider

public boolean isEventProvider()
Description copied from interface: J2EEManagedObject
Determines if this object implemnts the event provider type defined in the J2EE Management specification.

Specified by:
isEventProvider in interface J2EEManagedObject
Returns:
true if this class also implements the event manageable type; false otherwise


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