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 boolean
equals(Object o)
String
getId()
String
getInfo()
void
handleMessage(String line)
int
hashCode()
boolean
isLeaf()
void
send(String msg)
void
socketClosed(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:
handleMessage
in interfaceSocketWatcher
-
socketClosed
- Specified by:
socketClosed
in interfaceSocketWatcher
-