appl.parallel
Class SimpleResourceProperties

java.lang.Object
  extended by appl.parallel.SimpleResourceProperties
All Implemented Interfaces:
ComputingResourceProperties, Serializable
Direct Known Subclasses:
XuluServerProperties

public class SimpleResourceProperties
extends Object
implements ComputingResourceProperties, Serializable

Sets the following properties:

Maximum Java Memory
Free Java Memory
System Information
System Architecture
System Version
Hostname
IP

Author:
Dominik Appl
See Also:
ComputingResourceProperties, Serialized Form

Field Summary
protected  Properties properties
           
 
Constructor Summary
SimpleResourceProperties()
           
 
Method Summary
protected  String getFormatedMemoryString(long bytes)
           
 String getIP()
           
 String getName()
           
 String getPort()
           
 Properties getProperties()
           
 String getProperty(String key)
           
protected  long getUsedMemory()
           
 boolean isAvailable()
           
 void setProperty(String key, String value)
          Sets a property
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

properties

protected Properties properties
Constructor Detail

SimpleResourceProperties

public SimpleResourceProperties()
Method Detail

getProperties

public Properties getProperties()
Specified by:
getProperties in interface ComputingResourceProperties

getUsedMemory

protected long getUsedMemory()

getFormatedMemoryString

protected String getFormatedMemoryString(long bytes)

getProperty

public String getProperty(String key)
Specified by:
getProperty in interface ComputingResourceProperties
Parameters:
key - the key
Returns:
the property property associated with that key or null if not found

setProperty

public void setProperty(String key,
                        String value)
Description copied from interface: ComputingResourceProperties
Sets a property

Specified by:
setProperty in interface ComputingResourceProperties
Parameters:
key - the key
value - the value

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()
Specified by:
getName in interface ComputingResourceProperties
Returns:
the name of the resource (usually the hostname)

isAvailable

public boolean isAvailable()
Specified by:
isAvailable in interface ComputingResourceProperties
Returns:
says if the resource is available for computation (of in use).

getIP

public String getIP()
Specified by:
getIP in interface ComputingResourceProperties
Returns:
the ip of the resource

getPort

public String getPort()
Specified by:
getPort in interface ComputingResourceProperties
Returns:
port the resouce is bound to