Package
Class
Use
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
A
B
C
D
E
F
G
H
I
L
M
N
P
Q
R
S
T
U
V
A
addError()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Add to and check the error count.
B
BACKLOG
- Variable in class com.mischiefbox.pollserve.
Listener
The maximum number of un-accepted connections queued.
bActive
- Variable in class com.mischiefbox.pollserve.
ProcessorThread
Indicates if this is currently in use (active).
baMessageFooter
- Static variable in class com.mischiefbox.pollserve.
InputQueue
Message footer byte signature.
baMessageHeader
- Static variable in class com.mischiefbox.pollserve.
InputQueue
Message header byte signature.
bHandling
- Variable in class com.mischiefbox.pollserve.
ConnectionHandler
Flag to indicate if this is currently handling I/O.
bis
- Variable in class com.mischiefbox.pollserve.
ConnectionInfo
The input stream associated with the socket.
bListening
- Variable in class com.mischiefbox.pollserve.
Listener
Flag to indicate listening for new connections.
bManaging
- Variable in class com.mischiefbox.pollserve.
ThreadPool
Indicates if this is managing the thread pool.
bos
- Variable in class com.mischiefbox.pollserve.
ConnectionInfo
The output stream associated with the socket.
C
com.mischiefbox.pollserve
- package com.mischiefbox.pollserve
Implements a simple polling server.
ConnectionHandler
- class com.mischiefbox.pollserve.
ConnectionHandler
.
Responsible for keeping track of connection info objects, checking for new input on connections, and passing new output to connections.
ConnectionHandler(InputQueue, Queue)
- Constructor for class com.mischiefbox.pollserve.
ConnectionHandler
Create a new connection handler.
ConnectionInfo
- class com.mischiefbox.pollserve.
ConnectionInfo
.
Connection information object.
ConnectionInfo(ConnectionHandler, Socket, int)
- Constructor for class com.mischiefbox.pollserve.
ConnectionInfo
Create a new connection info object.
D
dequeue()
- Method in class com.mischiefbox.pollserve.
Queue
Dequeue the next object on the queue.
E
enqueue(Object)
- Method in class com.mischiefbox.pollserve.
Queue
Enqueue a new object.
F
fIdleRatio
- Variable in class com.mischiefbox.pollserve.
ThreadPool
Idle thread ratio.
finalize()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Finalizer, in case this goes out of scope.
FOOTER
- Static variable in class com.mischiefbox.pollserve.
Message
The header that indicates the end of a message.
G
getBytes()
- Method in class com.mischiefbox.pollserve.
Message
Get the message's byte representation.
getConnectionId()
- Method in class com.mischiefbox.pollserve.
Message
Get the Message's associated connection id.
getConnectionId()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Get the connection id.
getConnectionId()
- Method in class com.mischiefbox.pollserve.
MessageTooLargeException
Gets the offending connection id.
getContent()
- Method in class com.mischiefbox.pollserve.
Message
Get the Message's content.
getErrors()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Get the number of errors on the connection.
getFree()
- Method in class com.mischiefbox.pollserve.
ThreadPool
Get the next free thread from the pool.
getInputStream()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Get the input stream.
getLastUsed()
- Method in class com.mischiefbox.pollserve.
ProcessorThread
Gets the last used time.
getLastUsedTime()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Get the last used time (in milliseconds).
getOutputStream()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Get the output stream.
getSize()
- Method in class com.mischiefbox.pollserve.
Queue
Get the number of elements in the queue.
H
handler
- Variable in class com.mischiefbox.pollserve.
ConnectionInfo
The connection handler that created and is responsible for the connection.
handler
- Variable in class com.mischiefbox.pollserve.
Listener
The connection handler which gets new socket connections.
HEADER
- Static variable in class com.mischiefbox.pollserve.
Message
The header that indicates the start of a message.
hmConnectionInfo
- Variable in class com.mischiefbox.pollserve.
ConnectionHandler
Registered connection info objects.
htMessages
- Variable in class com.mischiefbox.pollserve.
InputQueue
The dictionary (Hashtable) of partial messages.
I
iErrorCount
- Variable in class com.mischiefbox.pollserve.
ConnectionInfo
The consecutive error count on the connection.
iIdleLifetime
- Variable in class com.mischiefbox.pollserve.
ThreadPool
The maximum idle thread lifetime.
iMaxThreads
- Variable in class com.mischiefbox.pollserve.
ThreadPool
The maximum number of threads in the thread pool.
incomingMessage(String, byte[])
- Method in class com.mischiefbox.pollserve.
InputQueue
Convert partial messages into Message objects.
InputQueue
- class com.mischiefbox.pollserve.
InputQueue
.
Input queue and manager.
InputQueue()
- Constructor for class com.mischiefbox.pollserve.
InputQueue
Create a new InputQueue.
InputQueueTester
- class com.mischiefbox.pollserve.
InputQueueTester
.
Test critical InputQueue functionality.
InputQueueTester()
- Constructor for class com.mischiefbox.pollserve.
InputQueueTester
iPort
- Variable in class com.mischiefbox.pollserve.
Listener
The port on which to listen for new connections.
isActive()
- Method in class com.mischiefbox.pollserve.
ProcessorThread
Indicates if this is actively processing.
isHandling()
- Method in class com.mischiefbox.pollserve.
ConnectionHandler
Indicates if this is handling I/O.
isListening()
- Method in class com.mischiefbox.pollserve.
Listener
Indicate if this is listening.
L
Listener
- class com.mischiefbox.pollserve.
Listener
.
Listens for new connections.
Listener(ConnectionHandler, int)
- Constructor for class com.mischiefbox.pollserve.
Listener
Create a new Listener.
lLastUsedMillis
- Variable in class com.mischiefbox.pollserve.
ProcessorThread
The last used time of this processor thread.
lLastUseMillis
- Variable in class com.mischiefbox.pollserve.
ConnectionInfo
The last recorded time I/O was performed on the socket.
M
main(String[])
- Static method in class com.mischiefbox.pollserve.
InputQueueTester
MAX_ERROR
- Static variable in class com.mischiefbox.pollserve.
ConnectionInfo
The maximum number of consecutive errors permitted for the connection.
MAX_MESSAGE_SIZE
- Static variable in class com.mischiefbox.pollserve.
InputQueue
The maximum incomplete message size.
MAX_PROCESSORS
- Variable in class com.mischiefbox.pollserve.
MessageHandler
The maximum number of processor threads allowed.
Message
- class com.mischiefbox.pollserve.
Message
.
Message object.
Message(String, String)
- Constructor for class com.mischiefbox.pollserve.
Message
Create a new Message object.
MessageHandler
- class com.mischiefbox.pollserve.
MessageHandler
.
Responsible for retrieving messages from the input queue, passing them off to the proper processor thread, and sending responses back to the output queue.
MessageHandler(Queue, Queue)
- Constructor for class com.mischiefbox.pollserve.
MessageHandler
Creates a new message handler.
MessageTooLargeException
- exception com.mischiefbox.pollserve.
MessageTooLargeException
.
Indicates that a message was too large.
MessageTooLargeException(String)
- Constructor for class com.mischiefbox.pollserve.
MessageTooLargeException
Create a new message too-large exception.
msg
- Variable in class com.mischiefbox.pollserve.
ProcessorThread
The message to process.
N
nextFree()
- Method in class com.mischiefbox.pollserve.
ThreadPool
Get the next free thread from the pool.
nowFree(ProcessorThread)
- Method in class com.mischiefbox.pollserve.
ThreadPool
Set a processor thread as free (idle).
P
peek()
- Method in class com.mischiefbox.pollserve.
Queue
Peeks at the next object available on the queue.
process(Message, Queue)
- Method in class com.mischiefbox.pollserve.
ProcessorThread
Process a message.
ProcessorThread
- class com.mischiefbox.pollserve.
ProcessorThread
.
Defines a message processor thread.
ProcessorThread(ThreadPool)
- Constructor for class com.mischiefbox.pollserve.
ProcessorThread
Create a new processor thread.
Q
qInput
- Variable in class com.mischiefbox.pollserve.
ConnectionHandler
The input (incoming message) queue.
qOutput
- Variable in class com.mischiefbox.pollserve.
ConnectionHandler
The output (outgoing message) queue.
qOutput
- Variable in class com.mischiefbox.pollserve.
ProcessorThread
The output queue which will receive message results (if any).
qThreads
- Variable in class com.mischiefbox.pollserve.
ThreadPool
The available thread pool.
Queue
- class com.mischiefbox.pollserve.
Queue
.
Implements a basic FIFO queue.
Queue()
- Constructor for class com.mischiefbox.pollserve.
Queue
Construct a new Queue.
R
registerConnectionInfo(ConnectionInfo)
- Method in class com.mischiefbox.pollserve.
ConnectionHandler
Register a new connection info object.
registerProcessorThread(ProcessorThread)
- Method in class com.mischiefbox.pollserve.
ThreadPool
Register a newly created processor thread with the pool.
resetError()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Reset the error count to zero (success in I/O).
run()
- Method in class com.mischiefbox.pollserve.
ConnectionHandler
Process connection I/O, including checking for available messages from the client and from the message handler.
run()
- Method in class com.mischiefbox.pollserve.
ProcessorThread
Process the message and put the results (if any) on the output queue.
run()
- Method in class com.mischiefbox.pollserve.
ThreadPool
Manage the processor thread pool.
run()
- Method in class com.mischiefbox.pollserve.
MessageHandler
Check for new messages on the input queue, get a new processor thread from the processor thread pool, and pass the message to the processor thread.
run()
- Method in class com.mischiefbox.pollserve.
Listener
Listen for new connections and pass them to the connection handler.
S
scanByteArray(byte[], byte[])
- Static method in class com.mischiefbox.pollserve.
InputQueue
Scan a byte array for a pattern.
sConnectionId
- Variable in class com.mischiefbox.pollserve.
Message
Connection id.
sConnectionId
- Variable in class com.mischiefbox.pollserve.
ConnectionInfo
The connection id (used to identify the connection).
sConnectionId
- Variable in class com.mischiefbox.pollserve.
MessageTooLargeException
The offending connection id.
server
- Variable in class com.mischiefbox.pollserve.
Listener
The server socket.
setConnectionId(String)
- Method in class com.mischiefbox.pollserve.
Message
Set the Message's associated connection id.
setContent(String)
- Method in class com.mischiefbox.pollserve.
Message
Set the Message's content.
setLastUsedTime()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Set the last used time to now.
shutdown()
- Method in class com.mischiefbox.pollserve.
ProcessorThread
Shut down the processor thread.
shutdown()
- Method in class com.mischiefbox.pollserve.
ThreadPool
Shut down the thread pool.
shutdown()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Shut down the connection gracefully.
shutdown()
- Method in class com.mischiefbox.pollserve.
MessageHandler
Shut down the message handler and the message processor thread pool.
SLEEP_MILLIS
- Static variable in class com.mischiefbox.pollserve.
ConnectionHandler
The sleep time for this thread (in between processing runs).
SLEEP_MILLIS
- Static variable in class com.mischiefbox.pollserve.
ThreadPool
Time between thread pool checks.
SLEEP_MILLIS
- Static variable in class com.mischiefbox.pollserve.
MessageHandler
The time to sleep between fetches from the input queue.
SLEEP_MILLIS
- Static variable in class com.mischiefbox.pollserve.
Listener
The number of milliseconds to sleep between servicing each new socket request.
sMessageContent
- Variable in class com.mischiefbox.pollserve.
Message
Message content.
sock
- Variable in class com.mischiefbox.pollserve.
ConnectionInfo
The Socket associated with the connection.
start()
- Method in class com.mischiefbox.pollserve.
Listener
Start listening.
stop()
- Method in class com.mischiefbox.pollserve.
Listener
Stop listening.
stopHandler()
- Method in class com.mischiefbox.pollserve.
ConnectionHandler
Stops the handler from handling I/O.
T
terminate()
- Method in class com.mischiefbox.pollserve.
ConnectionInfo
Close the socket connection immediately.
tHandler
- Variable in class com.mischiefbox.pollserve.
ConnectionHandler
The handler thread.
ThreadPool
- class com.mischiefbox.pollserve.
ThreadPool
.
Implements a simple thread pool.
ThreadPool(int)
- Constructor for class com.mischiefbox.pollserve.
ThreadPool
Create a new thread pool.
ThreadPool(int, float)
- Constructor for class com.mischiefbox.pollserve.
ThreadPool
Create a new thread pool and specify the idle ratio.
ThreadPool(int, float, int)
- Constructor for class com.mischiefbox.pollserve.
ThreadPool
Create a new thread pool, specify the idle ratio, and indicate the maximum lifetime of an idle thread.
tManager
- Variable in class com.mischiefbox.pollserve.
ThreadPool
The management thread.
toString()
- Method in class com.mischiefbox.pollserve.
Message
Get the message information.
tpManager
- Variable in class com.mischiefbox.pollserve.
ProcessorThread
Thread pool that manages this processor thread.
tProcessor
- Variable in class com.mischiefbox.pollserve.
ProcessorThread
The processor thread.
U
unregisterConnectionInfo(ConnectionInfo)
- Method in class com.mischiefbox.pollserve.
ConnectionHandler
Unregister a connection info object.
unregisterProcessorThread(ProcessorThread)
- Method in class com.mischiefbox.pollserve.
ThreadPool
Unregister a processor thread from the pool.
V
vThreads
- Variable in class com.mischiefbox.pollserve.
ThreadPool
The complete thread pool.
A
B
C
D
E
F
G
H
I
L
M
N
P
Q
R
S
T
U
V
Package
Class
Use
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
Copyright © 2001 by Christopher R. Jones. All Rights Reserved.