FileDocCategorySizeDatePackage
OldSystemPropertiesImpl.javaAPI DocGlassfish v2 API4281Fri May 04 22:23:20 BST 2007com.sun.enterprise.management.config

OldSystemPropertiesImpl

public final class OldSystemPropertiesImpl extends Object implements com.sun.enterprise.management.support.oldconfig.OldSystemProperties

Fields Summary
final com.sun.enterprise.management.support.Delegate
mDelegate
private static final String[]
EMPTY_SIG
private static final String[]
GET_PROPERTY_VALUE_SIG
private static final String[]
SET_PROPERTY_SIG
Constructors Summary
public OldSystemPropertiesImpl(com.sun.enterprise.management.support.Delegate delegate)



		
	   
	
		mDelegate	= delegate;
	
Methods Summary
public javax.management.AttributeListgetSystemProperties()

		try
		{
			return( (AttributeList)mDelegate.invoke( "getSystemProperties", null, EMPTY_SIG ) );
		}
		catch( RuntimeException e )
		{
			rethrowThrowable( e );
		}
		return( null );
	
public java.lang.StringgetSystemPropertyValue(java.lang.String propertyName)

		try
		{
			return( (String)mDelegate.invoke( "getSystemPropertyValue",
						new Object[] { propertyName }, GET_PROPERTY_VALUE_SIG ) );
		}
		catch( RuntimeException e )
		{
			rethrowThrowable( e );
		}
		return( null );
	
private voidrethrowThrowable(java.lang.Throwable t)
We want to avoid throwing anything that is not standard on the client side.

		final Throwable	result	= new ThrowableMapper( t ).map();
		
		if ( result instanceof Error )
		{
			throw (Error)result;
		}
		else if ( result instanceof RuntimeException )
		{
			throw (RuntimeException)result;
		}
		else
		{	
			throw new RuntimeException( result );
		}
	
public voidsetSystemProperty(javax.management.Attribute attr)

		try
		{
			mDelegate.invoke( "setSystemProperty", new Object[] { attr }, SET_PROPERTY_SIG );
		}
		catch( RuntimeException e )
		{
			rethrowThrowable( e );
		}