orca.shirako.core
Class ResourceData

java.lang.Object
  extended by orca.shirako.core.ResourceData
All Implemented Interfaces:
java.lang.Cloneable, ISerialize

public class ResourceData
extends java.lang.Object
implements java.lang.Cloneable, ISerialize

A ResourceData contains several collections of properties describing resources. Some of these collections are passed between actors during calls.


Field Summary
 java.util.Properties localProperties
          Local properties: kept locally
static java.lang.String PropertyConfigurationProperties
          Property name to use when serializing the configuration properties
static java.lang.String PropertyLocalProperties
          Property name to use when serializing the local properties
static java.lang.String PropertyRequestProperties
          Property name to use when serializing the request properties
static java.lang.String PropertyResourceProperties
          Property name to use when serializing the resource properties
 
Constructor Summary
ResourceData()
           
ResourceData(boolean empty)
          Create a new ResourceData object
 
Method Summary
 java.lang.Object clone()
          Make a copy of this ResourceData object.
 void flex(ResourceData properties)
          Absorb properties from a flex request to an extending reservation.
 java.util.Properties getConfigurationProperties()
          Obtain the configuration properties list
 java.util.Properties getLocalProperties()
          Obtain the local properties list
 java.util.Properties getRequestProperties()
          Obtain the request properties list
 java.util.Properties getResourceProperties()
          Obtain the resource properties list
 void merge(ResourceData other)
           
static void mergeProperties(java.util.Properties from, java.util.Properties to)
           
static void mergePropertiesPriority(java.util.Properties from, java.util.Properties to)
           
 void reset(java.util.Properties p)
          Deserialize the ResourceData from string
 void revisit(IActor actor, java.util.Properties p)
           
 java.util.Properties save()
          Serialize the ResourceData to a string
 void save(java.util.Properties p)
          Serializes the object into the given properties list.
 void setConfigurationProperties(java.util.Properties p)
          Set the configuration properties list
 void setLocalProperties(java.util.Properties p)
          Set the request properties list
 void setRequestProperties(java.util.Properties p)
          Set the request properties list
 void setResourceProperties(java.util.Properties p)
          Set the resource properties list
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PropertyLocalProperties

public static final java.lang.String PropertyLocalProperties
Property name to use when serializing the local properties

See Also:
Constant Field Values

PropertyRequestProperties

public static final java.lang.String PropertyRequestProperties
Property name to use when serializing the request properties

See Also:
Constant Field Values

PropertyResourceProperties

public static final java.lang.String PropertyResourceProperties
Property name to use when serializing the resource properties

See Also:
Constant Field Values

PropertyConfigurationProperties

public static final java.lang.String PropertyConfigurationProperties
Property name to use when serializing the configuration properties

See Also:
Constant Field Values

localProperties

public java.util.Properties localProperties
Local properties: kept locally

Constructor Detail

ResourceData

public ResourceData()

ResourceData

public ResourceData(boolean empty)
Create a new ResourceData object

Parameters:
empty - If true, no property lists will be created (Used during deserialization)
Method Detail

getLocalProperties

public java.util.Properties getLocalProperties()
Obtain the local properties list

Returns:

setLocalProperties

public void setLocalProperties(java.util.Properties p)
Set the request properties list

Parameters:
p - The request properties list

getRequestProperties

public java.util.Properties getRequestProperties()
Obtain the request properties list

Returns:

setRequestProperties

public void setRequestProperties(java.util.Properties p)
Set the request properties list

Parameters:
p - The request properties list

getResourceProperties

public java.util.Properties getResourceProperties()
Obtain the resource properties list

Returns:

setResourceProperties

public void setResourceProperties(java.util.Properties p)
Set the resource properties list

Parameters:
p - The resource properties list

getConfigurationProperties

public java.util.Properties getConfigurationProperties()
Obtain the configuration properties list

Returns:

setConfigurationProperties

public void setConfigurationProperties(java.util.Properties p)
Set the configuration properties list

Parameters:
p - The configuration properties list

clone

public java.lang.Object clone()
Make a copy of this ResourceData object.

Overrides:
clone in class java.lang.Object

flex

public void flex(ResourceData properties)
          throws java.lang.Exception
Absorb properties from a flex request to an extending reservation.

Parameters:
properties - the resource data properties
Throws:
java.lang.Exception

mergeProperties

public static void mergeProperties(java.util.Properties from,
                                   java.util.Properties to)

mergePropertiesPriority

public static void mergePropertiesPriority(java.util.Properties from,
                                           java.util.Properties to)

merge

public void merge(ResourceData other)

save

public java.util.Properties save()
                          throws java.lang.Exception
Serialize the ResourceData to a string

Specified by:
save in interface ISerialize
Returns:
Throws:
java.lang.Exception

save

public void save(java.util.Properties p)
          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into the given properties list.

Specified by:
save in interface ISerialize
Parameters:
p - properties list to serialize the object into
Throws:
java.lang.Exception

reset

public void reset(java.util.Properties p)
           throws java.lang.Exception
Deserialize the ResourceData from string

Specified by:
reset in interface ISerialize
Parameters:
s - The string representation of this ResourceData
Throws:
java.lang.Exception

revisit

public void revisit(IActor actor,
                    java.util.Properties p)
             throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.