Visit Platform at http://www.platform.com

Platform Symphony 5.1 Java API Reference

com.platform.symphony.soam
Class ResourceAttribute

java.lang.Object
  extended by com.platform.symphony.soam.ResourceAttribute

public class ResourceAttribute
extends java.lang.Object

A resource attribute that the application wishes to publish to the system.

NOTE: If any of the methods of this class are called after the main(...) method exits, the client or service process may behave in an undefined manner (for example, hang or terminate abnormally).

See Also:
ServiceContext.publish(com.platform.symphony.soam.ResourceAttribute)

Constructor Summary
ResourceAttribute(java.lang.String name)
          Constructs a ResourceAttribute object with the specified name.
 
Method Summary
 void setScope(long scope)
          Sets the scope of the resource attribute.
 void setValue(double value)
          Sets the value associated with the resource attribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceAttribute

public ResourceAttribute(java.lang.String name)
Constructs a ResourceAttribute object with the specified name. The attribute name should be the same as the name specified in a resource preference expression associated with the application's workload or the name specified in a definition. Maximum 256 characters.

Parameters:
name - The name of the resource attribute.
Method Detail

setValue

public void setValue(double value)
              throws SoamException
Sets the value associated with the resource attribute. The value to be used by the system when evaluating the resource preference expression within the context of the resource and its attributes (i.e. service instance or host) Default value is 1.000000e+300.

Parameters:
value - The value to be associated with the resource attribute.
Throws:
SoamException

setScope

public void setScope(long scope)
              throws SoamException
Sets the scope of the resource attribute. Resource attributes can exist either at a service instance level or be generally available to any entity on a host. Use this method to set whether the attribute applies at the host or instance level. This value can be one of the values defined by ResourceAttributeScope values.

Parameters:
scope - The scope of the attibute.
Throws:
SoamException
See Also:
ResourceAttributeScope

Version 5.1
Date Modified: -DREL_DATE=Apr 28 2011
Platform Computing. Accelerating Intelligence(TM).
Copyright (C) 2001-2009 Platform Computing Corporation. All rights reserved.