All Packages Class Hierarchy This Package Previous Next Index
Class org.mitre.cvw.mudsy.comm.MUDLink
java.lang.Object
|
+----org.mitre.cvw.mudsy.comm.MUDLink
- public class MUDLink
- extends Object
- implements Runnable
A component that links a client to a MUD server.
-
MUDLink(String, int)
- Constructs an object that links a client to a MUD server.
-
addMCPMessageListener(MCPMessageListener)
- Adds an MCP command listener
-
addMUDStatusListener(MUDStatusListener)
- Adds a MUD status listener
-
addMUDTextListener(MUDTextListener)
- Adds a MUD text listener
-
close()
- Closes the connection to a server
-
getHost()
- Gets the host
-
getMCPAuthKey()
- Gets the MCP authorization key
-
getPort()
- Gets the port
-
makeMessage(String)
- Create an MCP command with the proper authorization.
-
removeMCPMessageListener(MCPMessageListener)
- Removes an MCP command listener
-
removeMUDStatusListener(MUDStatusListener)
- Removes a MUD status listener
-
removeMUDTextListener(MUDTextListener)
- Removes a MUD text listener
-
run()
- Runs the socket listener loop associated with a connection to a MUD server
-
sendLine(String)
- If connected, send a line of text to the server
-
sendMCPMessage(Message)
- If connected, send an MCP command to the server
-
setHost(String)
- Sets the host
-
setPort(int)
- Sets the port
MUDLink
public MUDLink(String host,
int port)
- Constructs an object that links a client to a MUD server.
- Parameters:
- host - the name of the server
- port - the port of the server
getHost
public String getHost()
- Gets the host
setHost
public void setHost(String host)
- Sets the host
getPort
public int getPort()
- Gets the port
setPort
public void setPort(int port)
- Sets the port
getMCPAuthKey
public String getMCPAuthKey()
- Gets the MCP authorization key
- Returns:
- the key or null when MCP commands are disabled
addMUDStatusListener
public synchronized void addMUDStatusListener(MUDStatusListener msl)
- Adds a MUD status listener
removeMUDStatusListener
public synchronized void removeMUDStatusListener(MUDStatusListener msl)
- Removes a MUD status listener
addMUDTextListener
public synchronized void addMUDTextListener(MUDTextListener mal)
- Adds a MUD text listener
removeMUDTextListener
public synchronized void removeMUDTextListener(MUDTextListener mal)
- Removes a MUD text listener
addMCPMessageListener
public synchronized void addMCPMessageListener(MCPMessageListener mcl)
- Adds an MCP command listener
removeMCPMessageListener
public synchronized void removeMCPMessageListener(MCPMessageListener mcl)
- Removes an MCP command listener
run
public void run()
- Runs the socket listener loop associated with a connection to a MUD server
close
public void close()
- Closes the connection to a server
sendLine
public void sendLine(String line)
- If connected, send a line of text to the server
sendMCPMessage
public void sendMCPMessage(Message mcp)
- If connected, send an MCP command to the server
makeMessage
public Message makeMessage(String name)
- Create an MCP command with the proper authorization.
All Packages Class Hierarchy This Package Previous Next Index