Package VASSAL.chat.node
Class PlayerNode
java.lang.Object
VASSAL.chat.node.Node
VASSAL.chat.node.PlayerNode
- All Implemented Interfaces:
MsgSender,SocketWatcher
public class PlayerNode extends Node implements SocketWatcher
Node representing a single player.
A leaf node in a hierarchical server.
Reads and writes directly to a socket
getInfo() returns an encoded Properties object with real name, profile, etc.-
Field Summary
-
Constructor Summary
Constructors Constructor Description PlayerNode(Socket socket, AsynchronousServerNode server) -
Method Summary
Modifier and Type Method Description booleanequals(Object o)StringgetId()StringgetInfo()voidhandleMessage(String line)inthashCode()booleanisLeaf()voidsend(String msg)voidsocketClosed(SocketHandler handler)Methods inherited from class VASSAL.chat.node.Node
add, build, buildWithInfo, getChild, getChildren, getDescendant, getInfoProperty, getLeafDescendants, getParent, getPath, getPathAndInfo, remove, setInfo, setParent, toString
-
Field Details
-
id
-
info
-
-
Constructor Details
-
PlayerNode
- Throws:
IOException
-
-
Method Details
-
getId
-
isLeaf
public boolean isLeaf() -
send
-
getInfo
-
equals
-
hashCode
public int hashCode() -
handleMessage
- Specified by:
handleMessagein interfaceSocketWatcher
-
socketClosed
- Specified by:
socketClosedin interfaceSocketWatcher
-