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

OfflineDottedNamesMgr

public final class OfflineDottedNamesMgr extends Object

Fields Summary
private final OfflineDottedNamesRegistry
mRegistry
private final OfflineDottedNamePrefixes
mPrefixes
private final MBeanServer
mServer
private final String
WILD_ALL
Constructors Summary
public OfflineDottedNamesMgr(MBeanServer server)

	    mServer = server;
	    
	    mRegistry   = new OfflineDottedNamesRegistry();
	    mPrefixes   = OfflineDottedNamePrefixes.getInstance();
	
Methods Summary
private voiddebug(java.lang.Object o)

	    AMXDebug.getInstance().getOutput( "OfflineDottedNamesMgr" ).println( o );
	
public java.lang.Object[]dottedNameGet(java.lang.String[] names)

	    final Object[]  results = new Object[ names.length ];
	    
	    for( int i = 0; i < names.length; ++i )
	    {
	        try
	        {
	            results[ i ]    = dottedNameGet( names[ i ] );
	        }
	        catch( Exception e )
	        {
	            results[ i ]    = e;
	        }
	    }
        
        return results;
	
public java.lang.ObjectdottedNameGet(java.lang.String dottedName)

	
		 
	    
	
	    final String        prefix      = getPrefix( dottedName );
	    final ObjectName    objectName  = mRegistry.getObjectName( prefix );
	    
	    if ( objectName == null )
	    {
	        throw new IllegalArgumentException( dottedName );
	    }
	    
	    final String attrName   = getAttrName( dottedName );
	    
	    debug( "dottedNameGet: " + dottedName + ", prefix = " + prefix +
	        "attrName = " + attrName );
	    
	    Object value    = null;
	    try
	    {
	        value   = mServer.getAttribute( objectName, attrName );
	    }
	    catch( Exception e )
	    {
	        value   = e;
	    }
	    debug( "dottedNameGet: " + dottedName + " = " + value );
		return value;
	
public java.lang.Object[]dottedNameList(java.lang.String[] names)

		return new String[0];
	
public java.lang.Object[]dottedNameSet(java.lang.String[] nameValuePairs)

	    for( final String pair : nameValuePairs )
	    {
	    }
	    throw new UnsupportedOperationException( "dottedNameSet" );
	
private java.lang.StringgetAttrName(java.lang.String dottedName)

	    final String    prefix  = getPrefix( dottedName );
	    
	    return dottedName.substring( prefix.length() + 1, dottedName.length() );
	
private java.lang.StringgetPrefix(java.lang.String dottedName)

	    final int   idx = dottedName.lastIndexOf( dottedName );
	    if ( idx <= 0 )
	    {
	        throw new IllegalArgumentException( dottedName );
	    }
	    return dottedName.substring( 0, idx - 1 );
	
public voidrefresh()

	    // nothing to do--we're always "live"