|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.starhope.appius.net.AdminProcessor
public class AdminProcessor
Processing thread for an administrative connection (normally port 2772)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private BufferedReader |
in
the input stream |
private static int |
maxInputSize
the maximum input line length accepted |
private PrintWriter |
out
the output stream |
private Socket |
socket
the socket against which we're acting |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AdminProcessor(Socket userSocket)
create a new administrative processing thread |
Method Summary | |
---|---|
int |
compareTo(Thread o)
|
boolean |
equals(Object obj)
|
private String |
grabInput()
|
int |
hashCode()
|
private String |
processInput(String inputLine)
|
void |
run()
This is an overriding method. |
private void |
setup()
Set up this thread to execute |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.starhope.appius.net.ServerProcessor |
---|
start |
Field Detail |
---|
private static final int maxInputSize
private BufferedReader in
private PrintWriter out
private final Socket socket
Constructor Detail |
---|
public AdminProcessor(Socket userSocket)
userSocket
- the socket to which the remote user is
connectedMethod Detail |
---|
public int compareTo(Thread o)
compareTo
in interface Comparable<Thread>
Comparable.compareTo(java.lang.Object)
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
private String grabInput()
public int hashCode()
hashCode
in class Object
Object.hashCode()
private String processInput(String inputLine) throws PrivilegeRequiredException, NotFoundException
inputLine
- the input from the client
PrivilegeRequiredException
- if the client doesn't specify
the name of a Developer-level user
NotFoundException
- if the data input is malformedpublic void run()
run
in interface Runnable
run
in class Thread
Thread.run()
private void setup() throws IOException, UserDeadException
IOException
- if the I/O streams can't be initialized
UserDeadException
- if the user disconnects before setup is
complete
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |