Framework Professional Edition Package


com.prosyst.mbs.framework.resman
Interface ResourceManager

All Superinterfaces:
Remote

public interface ResourceManager
extends Remote


Field Summary
 
Fields inherited from interface com.prosyst.util.io.Remote
AUTHORIZED_ROLES
 
Method Summary
 java.lang.String getCurrentContextName()
          Gets the name of the context currently active for the calling thread.
 ExternalizableDictionary getResourceAllocations(java.lang.String bundleLocation)
          Gets the actual resource allocations of a bundle.
 ExternalizableDictionary getResourceRequirements(java.lang.String bundleLocation)
          Gets the resource requirements of a bundle.
 ExternalizableDictionary getSystemDefaults()
          Gets resource requirement defaults, held as System properties.
 java.lang.String switchToBundleContext(Bundle bundle)
          Switches on the context of the bundle.
 java.lang.String switchToContext(java.lang.String string)
          Switches on the context with a specified name.
 java.lang.String switchToObjectContext(java.lang.Object o)
          Switches on the context of an object.
 
Methods inherited from interface com.prosyst.util.io.Remote
remoteInterfaces
 

Method Detail

getResourceRequirements

ExternalizableDictionary getResourceRequirements(java.lang.String bundleLocation)
                                                 throws java.lang.IllegalArgumentException
Gets the resource requirements of a bundle. Bundle's resource requirements are described in an xml resource file, whose location is specified by the bundle's manifest header "Bundle-Requirements".

Parameters:
bundleLocation - location of the target bundle
Returns:
resource requirements. Both keys and values of the dictionary are strings. For example a dictionary may hold: "NewSegmentSize" <-> "10000" "OldSegmentSize" <-> "12000" If there is no xml description file, or the information in it is corrupted, then null is retrieved.
Throws:
java.lang.IllegalArgumentException - if there is no bundle with such a location or if the xml is not correct.

getResourceAllocations

ExternalizableDictionary getResourceAllocations(java.lang.String bundleLocation)
                                                throws java.lang.IllegalArgumentException
Gets the actual resource allocations of a bundle.

Parameters:
bundleLocation - bundleLocation location of the target bundle
Returns:
resource allocations. Both keys and values of the dictionary are strings. For example a dictionary may hold: "FreeMemory" <-> "122880" "UsedMemory" <-> "77120" "AllocatedMemory" <-> "200256"
Throws:
java.lang.IllegalArgumentException - if there is no bundle with such a location.

getSystemDefaults

ExternalizableDictionary getSystemDefaults()
Gets resource requirement defaults, held as System properties. Those properties are used, when a bundle has no xml resource requirements file description.

Returns:
resource requirements, held as system properties. Both keys and values of the dictionary are strings. For example a dictionary may hold: "NewSegmentSize" <-> "100000" "OldSegmentSize" <-> "100000" the keys are the same, as those contained in an xml file.

switchToObjectContext

java.lang.String switchToObjectContext(java.lang.Object o)
Switches on the context of an object. If the target object belongs to the System Bundle context, than this switching is not allowed.

Parameters:
o - target object, whose context will be set.
Returns:
the name of the context, which was active, before this switch on.

switchToContext

java.lang.String switchToContext(java.lang.String string)
Switches on the context with a specified name. If the target context name is equals to the System Bundle context, than this switching is not allowed

Parameters:
string - target context name
Returns:
the name of the context, which was active, before this switch on.

switchToBundleContext

java.lang.String switchToBundleContext(Bundle bundle)
Switches on the context of the bundle.

Parameters:
bundle - this bundle's context will be switched on.
Returns:
the name of the context, which was active, before this switch on.

getCurrentContextName

java.lang.String getCurrentContextName()
Gets the name of the context currently active for the calling thread.

Returns:
context's name.

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved