com.sun.enterprise.ee.cms.impl.base
Class SystemAdvertisementImpl

java.lang.Object
  extended by com.sun.enterprise.ee.cms.impl.base.SystemAdvertisementImpl
All Implemented Interfaces:
SystemAdvertisement, Serializable, Cloneable, Comparable<SystemAdvertisement>

public class SystemAdvertisementImpl
extends Object
implements SystemAdvertisement

This class is a default system advertisement and implements SystemAdvertisement

Author:
Bongjae Chang
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sun.enterprise.ee.cms.impl.base.SystemAdvertisement
hwarchTag, hwvendorTag, idTag, ipTag, nameTag, OSarchTag, OSNameTag, OSVersionTag
 
Constructor Summary
SystemAdvertisementImpl()
           
 
Method Summary
 void addEndpointAddress(String value)
          Sets the network interface's address in the form of a URI
 SystemAdvertisement clone()
          
 int compareTo(SystemAdvertisement other)
          
 boolean equals(Object obj)
          
 Map<String,String> getCustomTags()
           
 String getCustomTagValue(String tagName)
           
 List<String> getEndpointAddresses()
          Gets the address of the network interface in the form of URI
 String getHWArch()
          Gets the hWArch attribute of the SystemAdvertisement object
 String getHWVendor()
          Gets the hWVendor attribute of the SystemAdvertisement object
 PeerID getID()
          returns the id of the device
 String getName()
          Gets the name attribute of the SystemAdvertisement object
 String getOSArch()
          Gets the OSArch attribute of the SystemAdvertisement object
 String getOSName()
          Gets the OSName attribute of the SystemAdvertisement object
 String getOSVersion()
          Gets the OSVersion attribute of the SystemAdvertisement object
 List<URI> getURIs()
           
 int hashCode()
          
 void setCustomTag(String tag, String value)
           
 void setCustomTags(Map<String,String> tags)
           
 void setEndpointAddresses(List<String> endpoints)
          API for setting the IP addresses for all the network interfaces
 void setHWArch(String hwarch)
          Sets the hWArch attribute of the SystemAdvertisement object
 void setHWVendor(String hwvendor)
          Sets the hWVendor attribute of the SystemAdvertisement object
 void setID(PeerID id)
          sets the unique id
 void setName(String name)
          Sets the name attribute of the DeviceAdvertisement object
 void setOSArch(String osarch)
          Sets the OSArch attribute of the SystemAdvertisement object
 void setOSName(String osname)
          Sets the oSName attribute of the SystemAdvertisement object
 void setOSVersion(String osversion)
          Sets the oSVersion attribute of the SystemAdvertisement object
 String toString()
          
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SystemAdvertisementImpl

public SystemAdvertisementImpl()
Method Detail

setHWArch

public void setHWArch(String hwarch)
Sets the hWArch attribute of the SystemAdvertisement object

Specified by:
setHWArch in interface SystemAdvertisement
Parameters:
hwarch - The new hWArch value

setOSArch

public void setOSArch(String osarch)
Sets the OSArch attribute of the SystemAdvertisement object

Specified by:
setOSArch in interface SystemAdvertisement
Parameters:
osarch - The new hWArch value

setHWVendor

public void setHWVendor(String hwvendor)
Sets the hWVendor attribute of the SystemAdvertisement object

Specified by:
setHWVendor in interface SystemAdvertisement
Parameters:
hwvendor - The new hWVendor value

setID

public void setID(PeerID id)
sets the unique id

Specified by:
setID in interface SystemAdvertisement
Parameters:
id - The id

addEndpointAddress

public void addEndpointAddress(String value)
Sets the network interface's address in the form of a URI

Specified by:
addEndpointAddress in interface SystemAdvertisement
Parameters:
value - new uri (tcp://host:port) in IPv4 or (tcp://[host]:port) in IPv6

setEndpointAddresses

public void setEndpointAddresses(List<String> endpoints)
API for setting the IP addresses for all the network interfaces

Specified by:
setEndpointAddresses in interface SystemAdvertisement
Parameters:
endpoints - endpoint addresses

setName

public void setName(String name)
Sets the name attribute of the DeviceAdvertisement object

Specified by:
setName in interface SystemAdvertisement
Parameters:
name - The new name value

setOSName

public void setOSName(String osname)
Sets the oSName attribute of the SystemAdvertisement object

Specified by:
setOSName in interface SystemAdvertisement
Parameters:
osname - The new oSName value

setOSVersion

public void setOSVersion(String osversion)
Sets the oSVersion attribute of the SystemAdvertisement object

Specified by:
setOSVersion in interface SystemAdvertisement
Parameters:
osversion - The new oSVersion value

setCustomTags

public void setCustomTags(Map<String,String> tags)
Specified by:
setCustomTags in interface SystemAdvertisement

getCustomTags

public Map<String,String> getCustomTags()
Specified by:
getCustomTags in interface SystemAdvertisement

setCustomTag

public void setCustomTag(String tag,
                         String value)
Specified by:
setCustomTag in interface SystemAdvertisement

getHWArch

public String getHWArch()
Gets the hWArch attribute of the SystemAdvertisement object

Specified by:
getHWArch in interface SystemAdvertisement
Returns:
The hWArch value

getOSArch

public String getOSArch()
Gets the OSArch attribute of the SystemAdvertisement object

Specified by:
getOSArch in interface SystemAdvertisement
Returns:
The OSArch value

getHWVendor

public String getHWVendor()
Gets the hWVendor attribute of the SystemAdvertisement object

Specified by:
getHWVendor in interface SystemAdvertisement
Returns:
The hWVendor value

getID

public PeerID getID()
returns the id of the device

Specified by:
getID in interface SystemAdvertisement
Returns:
ID the device id

getEndpointAddresses

public List<String> getEndpointAddresses()
Gets the address of the network interface in the form of URI

Specified by:
getEndpointAddresses in interface SystemAdvertisement
Returns:
the list of URIs for all the network interfaces

getURIs

public List<URI> getURIs()
Specified by:
getURIs in interface SystemAdvertisement

getName

public String getName()
Gets the name attribute of the SystemAdvertisement object

Specified by:
getName in interface SystemAdvertisement
Returns:
The name value

getOSName

public String getOSName()
Gets the OSName attribute of the SystemAdvertisement object

Specified by:
getOSName in interface SystemAdvertisement
Returns:
The OSName value

getOSVersion

public String getOSVersion()
Gets the OSVersion attribute of the SystemAdvertisement object

Specified by:
getOSVersion in interface SystemAdvertisement
Returns:
The OSVersion value

getCustomTagValue

public String getCustomTagValue(String tagName)
                         throws NoSuchFieldException
Specified by:
getCustomTagValue in interface SystemAdvertisement
Throws:
NoSuchFieldException

clone

public SystemAdvertisement clone()
                          throws CloneNotSupportedException

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

compareTo

public int compareTo(SystemAdvertisement other)

Specified by:
compareTo in interface Comparable<SystemAdvertisement>

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.