org.apache.geronimo.connector
Class AdminObjectWrapper

java.lang.Object
  extended by org.apache.geronimo.connector.AdminObjectWrapper
All Implemented Interfaces:
DynamicGBean, JCAAdminObject, J2EEManagedObject, ResourceSource<RuntimeException>

public class AdminObjectWrapper
extends Object
implements DynamicGBean, JCAAdminObject, ResourceSource<RuntimeException>

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()
           
 Object invoke(String name, Object[] arguments, String[] types)
          no-op DynamicGBean method
 boolean isEventProvider()
           
 boolean isStateManageable()
           
 boolean isStatisticsProvider()
           
 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 ResourceSource<RuntimeException>
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()
Specified by:
getObjectName in interface J2EEManagedObject

isStateManageable

public boolean isStateManageable()
Specified by:
isStateManageable in interface J2EEManagedObject

isStatisticsProvider

public boolean isStatisticsProvider()
Specified by:
isStatisticsProvider in interface J2EEManagedObject

isEventProvider

public boolean isEventProvider()
Specified by:
isEventProvider in interface J2EEManagedObject


Copyright © 2003-2010 The Apache Geronimo development community. All Rights Reserved.