com.planet_ink.coffee_mud.core.intermud.cm1
Class RequestHandler

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.intermud.cm1.RequestHandler
All Implemented Interfaces:
CMRunnable, java.lang.Runnable

public class RequestHandler
extends java.lang.Object
implements CMRunnable


Constructor Summary
RequestHandler(java.nio.channels.SocketChannel chan, int maxIdleMillis)
           
 
Method Summary
 long activeTimeMillis()
          Returns the number of milliseconds this runnable has been running.
 void addDependent(java.lang.String s, java.lang.Object O)
           
 void close()
           
 void delDependent(java.lang.String s)
           
 void execute(java.lang.String line)
           
 int getGroupID()
          The group identifier for this runnable, which may be used for executor selection
 long getStartTime()
          Either the time this runnable did start running, or will start running, depending on whether it's scheduled
 PhysicalAgent getTarget()
           
 MOB getUser()
           
 boolean isRunning()
           
 void login(MOB M)
           
 void logout()
           
 boolean needsClosing()
           
 void run()
           
 void sendMsg(java.lang.String msg)
           
 void setEndOfLine(java.lang.String... msgs)
           
 void setTarget(PhysicalAgent A)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestHandler

public RequestHandler(java.nio.channels.SocketChannel chan,
                      int maxIdleMillis)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

activeTimeMillis

public long activeTimeMillis()
Description copied from interface: CMRunnable
Returns the number of milliseconds this runnable has been running.

Specified by:
activeTimeMillis in interface CMRunnable
Returns:
the time in millis

sendMsg

public void sendMsg(java.lang.String msg)
             throws java.io.IOException
Throws:
java.io.IOException

close

public void close()

shutdown

public void shutdown()

login

public void login(MOB M)

setTarget

public void setTarget(PhysicalAgent A)

getTarget

public PhysicalAgent getTarget()

getUser

public MOB getUser()

logout

public void logout()

addDependent

public void addDependent(java.lang.String s,
                         java.lang.Object O)

delDependent

public void delDependent(java.lang.String s)

isRunning

public boolean isRunning()

needsClosing

public boolean needsClosing()

getStartTime

public long getStartTime()
Description copied from interface: CMRunnable
Either the time this runnable did start running, or will start running, depending on whether it's scheduled

Specified by:
getStartTime in interface CMRunnable
Returns:
the time in millis

getGroupID

public int getGroupID()
Description copied from interface: CMRunnable
The group identifier for this runnable, which may be used for executor selection

Specified by:
getGroupID in interface CMRunnable
Returns:
the identifier for this runnable

run

public void run()
Specified by:
run in interface java.lang.Runnable

setEndOfLine

public void setEndOfLine(java.lang.String... msgs)

execute

public void execute(java.lang.String line)