org.universAAL.middleware.interfaces
Class PeerCard

Package class diagram package PeerCard
java.lang.Object
  extended by org.universAAL.middleware.interfaces.PeerCard

public class PeerCard
extends Object

This class identifies a Peer in the AAL space

Author:
Michele Girolami, Francesco Furfari, Stefano Lenzi

Constructor Summary
PeerCard(PeerRole role, String containerUnit, String platformUnit)
          Instantiate a PeerCard and generated the peer unique ID
PeerCard(String strSerialization)
          Deprecated.  
PeerCard(String ID, PeerRole role)
           
 
Method Summary
 boolean equals(Object o)
           
 String getCONTAINER_UNIT()
           
 String getOS()
           
 String getPeerID()
          Return the peer unique ID
 String getPLATFORM_UNIT()
           
 PeerRole getRole()
           
 int hashCode()
           
 boolean isCoordinator()
           
 void setCONTAINER_UNIT(String cONTAINER_UNIT)
           
 void setOS(String oS)
           
 void setPLATFORM_UNIT(String pLATFORM_UNIT)
           
 void setRole(PeerRole role)
           
 String toString()
           
 URI toURI()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PeerCard

public PeerCard(PeerRole role,
                String containerUnit,
                String platformUnit)
Instantiate a PeerCard and generated the peer unique ID

Parameters:
role -

PeerCard

public PeerCard(String ID,
                PeerRole role)

PeerCard

public PeerCard(String strSerialization)
Deprecated. 

Parameters:
strSerialization -
Method Detail

getPeerID

public String getPeerID()
Return the peer unique ID

Returns:
String representing the ID

getRole

public PeerRole getRole()

setRole

public void setRole(PeerRole role)

isCoordinator

public boolean isCoordinator()
Returns:
true if the Peer owns the Coordinator role, false otherwise

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getPLATFORM_UNIT

public String getPLATFORM_UNIT()

setPLATFORM_UNIT

public void setPLATFORM_UNIT(String pLATFORM_UNIT)

getCONTAINER_UNIT

public String getCONTAINER_UNIT()

setCONTAINER_UNIT

public void setCONTAINER_UNIT(String cONTAINER_UNIT)

getOS

public String getOS()

setOS

public void setOS(String oS)

toURI

public URI toURI()
Returns:
a URI representing the PeerCard, that is actually based on the PeerId
Since:
2.0.3


Copyright © 2014 universAAL Consortium. All Rights Reserved.