org.elkoserver.foundation.server.metadata
Class LoadDesc

java.lang.Object
  extended by org.elkoserver.foundation.server.metadata.LoadDesc
All Implemented Interfaces:
Encodable

public class LoadDesc
extends Object
implements Encodable

Description of the load on a server.


Constructor Summary
LoadDesc(String label, double load, int providerID)
           
 
Method Summary
 JSONLiteral encode(EncodeControl control)
          Encode this object for transmission or persistence.
 JSONLiteralArray encodeAsArray()
          Encode this descriptor as a single-element JSONLiteralArray.
 String label()
          Get the label for the server being described.
 double load()
          Get the reported load factor.
 int providerID()
          Get the provider ID for the server being described.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadDesc

@JSONMethod(value={"label","load","provider"})
public LoadDesc(String label,
                                double load,
                                int providerID)
Method Detail

label

public String label()
Get the label for the server being described.

Returns:
the server label.

load

public double load()
Get the reported load factor.

Returns:
the load factor.

providerID

public int providerID()
Get the provider ID for the server being described.

Returns:
the provider ID.

encode

public JSONLiteral encode(EncodeControl control)
Encode this object for transmission or persistence.

Specified by:
encode in interface Encodable
Parameters:
control - Encode control determining what flavor of encoding should be done.
Returns:
a JSON literal representing this object.

encodeAsArray

public JSONLiteralArray encodeAsArray()
Encode this descriptor as a single-element JSONLiteralArray.