org.apache.geronimo.connector
Class AdminObjectWrapper

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

public class AdminObjectWrapper
extends Object
implements org.apache.geronimo.gbean.DynamicGBean, org.apache.geronimo.management.geronimo.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, org.apache.geronimo.kernel.Kernel kernel, org.apache.geronimo.gbean.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,
                          org.apache.geronimo.kernel.Kernel kernel,
                          org.apache.geronimo.gbean.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 org.apache.geronimo.management.geronimo.JCAAdminObject

getAdminObjectClass

public String getAdminObjectClass()
Returns class of wrapped AdminObject.

Specified by:
getAdminObjectClass in interface org.apache.geronimo.management.geronimo.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 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

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 org.apache.geronimo.management.geronimo.JCAAdminObject

setConfigProperty

public void setConfigProperty(String property,
                              Object value)
                       throws Exception
Specified by:
setConfigProperty in interface org.apache.geronimo.management.geronimo.JCAAdminObject
Throws:
Exception

getConfigProperty

public Object getConfigProperty(String property)
                         throws Exception
Specified by:
getConfigProperty in interface org.apache.geronimo.management.geronimo.JCAAdminObject
Throws:
Exception

getObjectName

public String getObjectName()
Specified by:
getObjectName in interface org.apache.geronimo.management.J2EEManagedObject

isStateManageable

public boolean isStateManageable()
Specified by:
isStateManageable in interface org.apache.geronimo.management.J2EEManagedObject

isStatisticsProvider

public boolean isStatisticsProvider()
Specified by:
isStatisticsProvider in interface org.apache.geronimo.management.J2EEManagedObject

isEventProvider

public boolean isEventProvider()
Specified by:
isEventProvider in interface org.apache.geronimo.management.J2EEManagedObject


Copyright © 2006 Apache Software Foundation. All Rights Reserved.