FileDocCategorySizeDatePackage
ConfigDelegate.javaAPI DocGlassfish v2 API7156Fri May 04 22:23:40 BST 2007com.sun.enterprise.management.offline

ConfigDelegate

public class ConfigDelegate extends com.sun.enterprise.management.support.DelegateBase

Fields Summary
private final ConfigBeanHelper
mHelper
Constructors Summary
ConfigDelegate(com.sun.enterprise.config.ConfigContext configContext, String xPath)

        super( "ConfigDelegate", null );
        mHelper = ConfigBeanHelperFactory.getInstance( configContext ).getHelper( xPath );
    
ConfigDelegate(com.sun.enterprise.config.ConfigContext configContext, com.sun.enterprise.config.ConfigBean configBean)

        super( "ConfigDelegate", null );
        mHelper = ConfigBeanHelperFactory.getInstance( configContext ).getHelper( configBean );
    
Methods Summary
private voidflush()

        try
        {
            mHelper.getConfigContext().flush();
        }
        catch (ConfigException e)
        {
            throw new RuntimeException( e );
        }
    
public java.lang.ObjectgetAttribute(java.lang.String attrName)

    	final Object  result  = mHelper.getAttribute(attrName);
    	
    	return result;
    
public java.lang.StringgetDescription()

        return mHelper.getDescription();
    
public javax.management.MBeanInfogetMBeanInfo()

        return mHelper.getMBeanInfo();
    
public javax.management.AttributeListgetProperties()

see
com.sun.enterprise.management.config.OldPropertiesImpl

        return mHelper.getProperties();
    
public java.lang.StringgetPropertyValue(java.lang.String name)

see
com.sun.enterprise.management.config.OldPropertiesImpl

        return mHelper.getPropertyValue( name );
    
public javax.management.AttributeListgetSystemProperties()

see
com.sun.enterprise.management.config.OldPropertiesImpl

        return mHelper.getSystemProperties();
    
public java.lang.StringgetSystemPropertyValue(java.lang.String name)

see
com.sun.enterprise.management.config.OldPropertiesImpl

        return mHelper.getSystemPropertyValue( name );
    
public final java.lang.Objectinvoke(java.lang.String operationName, java.lang.Object[] args, java.lang.String[] types)

        Object  result  = null;
        final int   numArgs = args == null ? 0 : args.length;
        
        if ( "getProperties".equals( operationName ) &&
            numArgs == 0 )
        {
            result  = getProperties();
        }
        else if ( "getPropertyValue".equals( operationName ) &&
            numArgs == 1 && types[0].equals( String.class.getName() ) )
        {
            result  = getPropertyValue( (String)args[ 0 ] );
        }
        else if ( "setProperty".equals( operationName ) &&
            numArgs == 1 && types[0].equals( Attribute.class.getName() ) )
        {
            setProperty( (Attribute)args[ 0 ] );
        }
        else if ( "getSystemProperties".equals( operationName ) &&
            numArgs == 0 )
        {
            result  = getSystemProperties();
        }
        else if ( "getSystemPropertyValue".equals( operationName ) &&
            numArgs == 1 && types[0].equals( String.class.getName() ) )
        {
            result  = getSystemPropertyValue( (String)args[ 0 ] );
        }
        else if ( "setSystemProperty".equals( operationName ) &&
            numArgs == 1 && types[0].equals( Attribute.class.getName() ) )
        {
            setSystemProperty( (Attribute)args[ 0 ] );
        }
        else
        {
            result  = mHelper.handleInvoke( operationName, args, types );
        }
        
        flush();
    	
        return result;
    
public voidsetAttribute(javax.management.Attribute attr)

    	mHelper.setAttribute( attr );
    	
    	flush();
    
public voidsetDescription(java.lang.String description)

        mHelper.setDescription( description );
    
public voidsetProperty(javax.management.Attribute attr)

see
com.sun.enterprise.management.config.OldPropertiesImpl

        mHelper.setProperty( attr );
    
public voidsetSystemProperty(javax.management.Attribute attr)

see
com.sun.enterprise.management.config.OldPropertiesImpl

        mHelper.setSystemProperty( attr );