com.jrockit.mc.rjmx
Class DescriptorRepository

java.lang.Object
  extended by com.jrockit.mc.rjmx.DescriptorRepository

public final class DescriptorRepository
extends java.lang.Object

The repository for IConnectionDescriptors.

Author:
Marcus Hirt

Constructor Summary
DescriptorRepository()
           
 
Method Summary
 void add(IConnectionDescriptor descriptor)
          Registers the supplied descriptor with this model, replacing any descriptor with the same UID.
 void clearPasswords()
          Clears all the passwords for the ConnectionDescriptors managed by this DescriptorRepository.
 boolean contains(IConnectionDescriptor descriptor)
          Returns true if the repository contains the descriptor.
 IConnectionDescriptor findDescriptorByConnectionName(java.lang.String connectionName)
          Looks up the connection descriptor with the specified connection name.
 IConnectionDescriptor getConnectionDescriptorByGUID(java.lang.String uid)
          Returns the descriptor with the specified UID.
 java.util.Collection getConnectionDescriptors()
           
 boolean remove(IConnectionDescriptor connectionDescriptor)
          Removes both the descriptor from the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorRepository

public DescriptorRepository()
Method Detail

getConnectionDescriptors

public java.util.Collection getConnectionDescriptors()
Returns:
the available connection descriptors.

getConnectionDescriptorByGUID

public IConnectionDescriptor getConnectionDescriptorByGUID(java.lang.String uid)
Returns the descriptor with the specified UID.

Parameters:
uid - the UID of the descriptor to return.
Returns:
the ConnectionDescriptor having the specified id.

contains

public boolean contains(IConnectionDescriptor descriptor)
Returns true if the repository contains the descriptor.

Parameters:
descriptor - the descriptor to check for.
Returns:
true if this model contains this descriptor.

remove

public boolean remove(IConnectionDescriptor connectionDescriptor)
Removes both the descriptor from the model. Also removes any corresponding connector from the cache.

Parameters:
connectionDescriptor - the descriptor to remove.

add

public void add(IConnectionDescriptor descriptor)
Registers the supplied descriptor with this model, replacing any descriptor with the same UID.

Parameters:
descriptor - the connection descriptor to register.

findDescriptorByConnectionName

public IConnectionDescriptor findDescriptorByConnectionName(java.lang.String connectionName)
Looks up the connection descriptor with the specified connection name.

Parameters:
connectionName - the connection name of the descriptor being looked up.
Returns:
the matching connection descriptor, or null if no such descriptor was found.

clearPasswords

public void clearPasswords()
Clears all the passwords for the ConnectionDescriptors managed by this DescriptorRepository.



Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.