Class TinyMudConnection
java.lang.Object
|
+--mstar.Connection
|
+--TinyMudConnection
- public class TinyMudConnection
- extends Connection
Implements the connection class for TinyMud's.
- Version:
- 1.2
- Author:
- Thaddeus O. Cooper (cooper@tweenproject.org)
|
Method Summary |
void |
clearChatterVector()
Clears the chatter vector that output from the collaborative
environment is being stored in. |
void |
drainConnection(boolean wait)
Drain the connection until there is no more output waiting to be
collected. |
void |
drainConnectionToSuffix(boolean wait)
Drain the output from the collaborative environment until the
suffix that was set using setOutputSuffix is found. |
void |
findOutputPrefix()
Find the output prefix in the input stream. |
java.util.Vector |
getChatterVector()
Returns the chatter vector that output from the collaborative
environment is stored in for later processing. |
void |
loginToMud(java.lang.String name,
java.lang.String password)
Log the robot into the MUD/MOO. |
void |
logOffMud()
Log the robot off the MUD/MOO. |
| Methods inherited from class mstar.Connection |
available,
connectToMud,
drainConnection,
drainConnectionToSuffix,
getHostname,
getInputStream,
getOutputPrefix,
getOutputStream,
getOutputSuffix,
getPort,
getRobotName,
readLine,
setHostname,
setOutputPrefix,
setOutputSuffix,
setPort,
setRobotName,
waitForData |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
TinyMudConnection
public TinyMudConnection()
findOutputPrefix
public void findOutputPrefix()
- Find the output prefix in the input stream.
- Overrides:
- findOutputPrefix in class Connection
drainConnection
public void drainConnection(boolean wait)
- Drain the connection until there is no more output waiting to be
collected. If wait is set to true, wait for output it there is
no output currently waiting.
- Overrides:
- drainConnection in class Connection
- Parameters:
wait - if true, wait for output if none is currently
available. If false, and no data is available then
just return.
drainConnectionToSuffix
public void drainConnectionToSuffix(boolean wait)
- Drain the output from the collaborative environment until the
suffix that was set using setOutputSuffix is found. If wait is
set to true wait until data becomes available from the
collaborative environment. If wait is set to false and no data is
available return immediately.
- Overrides:
- drainConnectionToSuffix in class Connection
- Parameters:
wait - if true, wait for output if none is currently
available. If false, and no data is available then
just return.
getChatterVector
public java.util.Vector getChatterVector()
- Returns the chatter vector that output from the collaborative
environment is stored in for later processing.
- Overrides:
- getChatterVector in class Connection
- Returns:
- the Vector containing output from the collaborative
environment.
clearChatterVector
public void clearChatterVector()
- Clears the chatter vector that output from the collaborative
environment is being stored in.
- Overrides:
- clearChatterVector in class Connection
loginToMud
public void loginToMud(java.lang.String name,
java.lang.String password)
- Log the robot into the MUD/MOO. This routine should be called
after connectToMud has been called.
- Overrides:
- loginToMud in class Connection
- Parameters:
name - the name of the robot.password - the password of the robot.
logOffMud
public void logOffMud()
- Log the robot off the MUD/MOO.
- Overrides:
- logOffMud in class Connection