|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectexperiment.entity.Entity
experiment.entity.Node
public class Node
Created by IntelliJ IDEA. User: andy Date: Mar 10, 2010 Represents an experiment Node and stores all the node's data
Field Summary | |
---|---|
static java.lang.String |
defaultDescription
|
static boolean |
defaultGateway
|
static java.lang.String |
defaultNodeType
|
static Position |
defaultPosition
Static default variables |
static java.lang.String |
defaultProgDetails
|
Fields inherited from class experiment.entity.Entity |
---|
capabilityMap, enabled, entity3d, isNode, lock, state |
Constructor Summary | |
---|---|
Node(ExperimentState state,
java.lang.String id,
Position position,
java.lang.String gateway,
java.lang.String programDetails,
java.lang.String nodeType,
java.lang.String description)
Full Constructor. |
Method Summary | |
---|---|
static void |
addDefaultCapability(Capability dC)
Is called during experiment configurarion to set the default node capabilities. |
void |
addLink(Link link,
java.lang.String targetId)
Adds a link to this Node's linkMap. |
java.lang.String |
getDescription()
This method is not synchronized as the description is not expected to change after initialization. |
java.lang.String |
getId()
This method is not synchronized as the node id cannot change. |
java.util.Collection<Link> |
getLinkSet()
|
java.lang.String |
getNodeType()
This method is not synchronized as the Node type is not expected to change after initialization. |
Position |
getPosition()
|
java.lang.String |
getProgramDetails()
This method is not synchronized as the program Details are not expected to change after initialization. |
Link |
indexLink(java.lang.String targetId)
Indexes the links that have this node as source. |
void |
initialize()
Set's all Node variables to the default value |
boolean |
isGateway()
|
void |
setGateway(boolean gateway)
Set the Node as a gateway. |
void |
setNodeType(java.lang.String nodeType)
Set the NodeType. |
void |
updatePosition(Position position)
Update the Node's position. |
Methods inherited from class experiment.entity.Entity |
---|
getCapability, getCapabilitySet, getEntity3d, getState, isEnabled, isNode, setCapability, setCapability, setEntity3d, setMonitored, setState, setStatus, updated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String defaultDescription
public static boolean defaultGateway
public static java.lang.String defaultNodeType
public static Position defaultPosition
public static java.lang.String defaultProgDetails
Constructor Detail |
---|
public Node(ExperimentState state, java.lang.String id, Position position, java.lang.String gateway, java.lang.String programDetails, java.lang.String nodeType, java.lang.String description)
state
- the object that contains all the data for a given experiment stateid
- the node's idposition
- the node's positiongateway
- it is a Boolean value in a String indicating if the node is a gateway or not. User can specify a default value.programDetails
- contains textual information describing the software image loaded on the node.nodeType
- contains textual information about the type of the device.description
- this is a textual description of the node.Method Detail |
---|
public static void addDefaultCapability(Capability dC)
dC
- the capability to be setpublic void addLink(Link link, java.lang.String targetId)
link
- the link has this node as sourcetargetId
- the id of the link's target Nodepublic java.lang.String getDescription()
public java.lang.String getId()
public java.util.Collection<Link> getLinkSet()
public java.lang.String getNodeType()
public Position getPosition()
public java.lang.String getProgramDetails()
public Link indexLink(java.lang.String targetId)
targetId
- the id of the node that is the target of the desired link
public void initialize()
public boolean isGateway()
public void setGateway(boolean gateway)
gateway
- true if this is a gateway.public void setNodeType(java.lang.String nodeType)
nodeType
- a String containing the new node typepublic void updatePosition(Position position)
position
- the new position
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |