|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeer2me.message.SendableNodeInfo
public class SendableNodeInfo
This class implements the interface Serializable and is used by the framework to send information about
all the nodes in the network. This class is used as a linked list, since it also contains an instance of
itself. This enables the framework to iterate through the class easily. SendableNodeInfo is used by the
classes BluetoothListener
and BluetoothSearcher
Should only be used by the framework itself
Serializable
Constructor Summary | |
---|---|
SendableNodeInfo()
Required default constructor so that the class ObjectInputStream can instanciate the class |
|
SendableNodeInfo(java.lang.String nodeName,
java.lang.String nodeAddress,
java.lang.String connectionURL,
java.lang.String pingConnectionURL)
Constructor |
Method Summary | |
---|---|
void |
deSerialize(java.io.DataInputStream dis,
java.util.Stack stack)
Method required by the interface Serializable . |
java.lang.String |
getConnectionURL()
Returns the connectionURL of the node in this class |
SendableNodeInfo |
getNextNode()
Returns the next node in the linked list if there is one |
java.lang.String |
getNodeAddress()
Returns the address to this node |
java.lang.String |
getNodeName()
Returns the name to this node |
java.lang.String |
getPingConnectionUrl()
Returns the pingConnectionURL of the node in this class |
void |
serialize(java.io.DataOutputStream dos,
java.util.Stack stack)
Method required by the interface Serializable . |
void |
setConnectionURL(java.lang.String connectionURL)
Sets the connectionURL of the node in this class |
void |
setNextNode(SendableNodeInfo nextNode)
Sets the next node in the linked list |
void |
setNodeAddress(java.lang.String nodeAddress)
Sets the address of this node |
void |
setNodeName(java.lang.String nodeName)
Sets the name of this node |
void |
setPingConnectionUrl(java.lang.String pingConnectionUrl)
Sets the pingConnectionURL of the node in this class |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SendableNodeInfo()
ObjectInputStream
can instanciate the class
public SendableNodeInfo(java.lang.String nodeName, java.lang.String nodeAddress, java.lang.String connectionURL, java.lang.String pingConnectionURL)
nodeName
- The name of the nodenodeAddress
- The address of the nodeconnectionURL
- The URL which another node has to use in order to connect to the given nodepingConnectionURL
- The URL which another node has to use in order to ping the given nodeMethod Detail |
---|
public java.lang.String getConnectionURL()
public java.lang.String getNodeAddress()
public java.lang.String getNodeName()
public void deSerialize(java.io.DataInputStream dis, java.util.Stack stack) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
Serializable
. Deserializes the datainputstream to a
SendableNodeInfo object.
deSerialize
in interface Serializable
java.io.IOException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
public void serialize(java.io.DataOutputStream dos, java.util.Stack stack) throws java.io.IOException
Serializable
. Before an instance of this class can be
sent over the network, it must first be serialized. This method writes the content of this class
to the dataoutputstream given in the first parameter of this method.
serialize
in interface Serializable
java.io.IOException
public SendableNodeInfo getNextNode()
public void setNextNode(SendableNodeInfo nextNode)
nextNode
- The node that will be the next node in the listpublic void setConnectionURL(java.lang.String connectionURL)
connectionURL
- The URL that must be used to connect to the node in this classpublic void setNodeAddress(java.lang.String nodeAddress)
nodeAddress
- The address of this nodepublic void setNodeName(java.lang.String nodeName)
nodeName
- The name of this nodepublic java.lang.String getPingConnectionUrl()
public void setPingConnectionUrl(java.lang.String pingConnectionUrl)
pingConnectionUrl
- of the node in this class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |