|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeer2me.network.Network
public abstract class Network
This is an abstract class representing the
network used for communication. Should be extended
by the class representing networktechnology.
I.e. Bluetooth
extends this class.
Constructor Summary | |
---|---|
Network()
Default empty constructor |
Method Summary | |
---|---|
abstract void |
clean()
This method should clean up the framework, closing active connections etc. |
abstract void |
echo(Node node)
This method should run Node.incrementEcho() on the
given Node |
abstract void |
initialize()
This method should initialize the framework making it discoverable and ready to perform a search |
abstract void |
messageReceived(Message message)
This method should be called whenever a Message is received |
abstract void |
nodeFound(NetworkNode networkNode)
This method should be called whenever a new node is found. |
abstract void |
nodeLost(Node node)
This method should be called whenever a node is lost or abscent. |
abstract void |
ping()
This method is needed by NetworkTimer to alert whenever a ping
should run |
abstract boolean |
search()
This method should perform a search for services and devices |
abstract void |
searchCompleted()
This method should be called wheneve a search is finished. |
abstract void |
sendMessage(Message message)
This method should send a Message to another
Node |
abstract void |
setActivatePing(boolean activeatePing)
This method sets if the ping-functionality should be used or not |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Network()
Method Detail |
---|
public abstract void initialize()
public abstract boolean search()
public abstract void sendMessage(Message message)
Message
to another
Node
message
- the Message to sendpublic abstract void setActivatePing(boolean activeatePing)
activeatePing
- true if the ping should be used, else falsepublic abstract void nodeFound(NetworkNode networkNode)
networkNode
- the networkNode that is foundpublic abstract void nodeLost(Node node)
node
- the node that is lost.public abstract void messageReceived(Message message)
Message
is received
message
- the message that is receivedpublic abstract void ping()
NetworkTimer
to alert whenever a ping
should run
public abstract void echo(Node node)
Node.incrementEcho()
on the
given Node
node
- the node that has respondedpublic abstract void clean()
public abstract void searchCompleted()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |