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.


Constructor Index

 o MUDLink(String, int)
Constructs an object that links a client to a MUD server.

Method Index

 o addMCPMessageListener(MCPMessageListener)
Adds an MCP command listener
 o addMUDStatusListener(MUDStatusListener)
Adds a MUD status listener
 o addMUDTextListener(MUDTextListener)
Adds a MUD text listener
 o close()
Closes the connection to a server
 o getHost()
Gets the host
 o getMCPAuthKey()
Gets the MCP authorization key
 o getPort()
Gets the port
 o makeMessage(String)
Create an MCP command with the proper authorization.
 o removeMCPMessageListener(MCPMessageListener)
Removes an MCP command listener
 o removeMUDStatusListener(MUDStatusListener)
Removes a MUD status listener
 o removeMUDTextListener(MUDTextListener)
Removes a MUD text listener
 o run()
Runs the socket listener loop associated with a connection to a MUD server
 o sendLine(String)
If connected, send a line of text to the server
 o sendMCPMessage(Message)
If connected, send an MCP command to the server
 o setHost(String)
Sets the host
 o setPort(int)
Sets the port

Constructors

 o 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

Methods

 o getHost
 public String getHost()
Gets the host

 o setHost
 public void setHost(String host)
Sets the host

 o getPort
 public int getPort()
Gets the port

 o setPort
 public void setPort(int port)
Sets the port

 o getMCPAuthKey
 public String getMCPAuthKey()
Gets the MCP authorization key

Returns:
the key or null when MCP commands are disabled
 o addMUDStatusListener
 public synchronized void addMUDStatusListener(MUDStatusListener msl)
Adds a MUD status listener

 o removeMUDStatusListener
 public synchronized void removeMUDStatusListener(MUDStatusListener msl)
Removes a MUD status listener

 o addMUDTextListener
 public synchronized void addMUDTextListener(MUDTextListener mal)
Adds a MUD text listener

 o removeMUDTextListener
 public synchronized void removeMUDTextListener(MUDTextListener mal)
Removes a MUD text listener

 o addMCPMessageListener
 public synchronized void addMCPMessageListener(MCPMessageListener mcl)
Adds an MCP command listener

 o removeMCPMessageListener
 public synchronized void removeMCPMessageListener(MCPMessageListener mcl)
Removes an MCP command listener

 o run
 public void run()
Runs the socket listener loop associated with a connection to a MUD server

 o close
 public void close()
Closes the connection to a server

 o sendLine
 public void sendLine(String line)
If connected, send a line of text to the server

 o sendMCPMessage
 public void sendMCPMessage(Message mcp)
If connected, send an MCP command to the server

 o makeMessage
 public Message makeMessage(String name)
Create an MCP command with the proper authorization.


All Packages  Class Hierarchy  This Package  Previous  Next  Index