public class ErrorReceiver extends ErrorServer
ErrorEvent via a socket. It acts as
a fully functional RMI-based ErrorCaster
and can therefore
be used as a converter from ascii-string-via-sockets to a fully RMI
message caster. The details of
the class functionality can be described as follows.
ErrorReceiver.ErrorHandler, takes over the client socket
and is responsible for the entire communication ('protocol'). This
helper thread is an extension to Handler.ErrorReceiver.ErrorHandler first establishes the streams to the
client (parent class functionality) and reads in the error event.ErrorServer.processError(stella.ErrorEvent) method is called that casts
the error event to the registered listeners.ErrorReceiver.ErrorHandler returns from its runProtocol
method which results in closing of all streams and the socket.| Modifier and Type | Class and Description |
|---|---|
protected class |
ErrorReceiver.ErrorHandler
Handles the error protocol.
|
static class |
ErrorReceiver.Run
For test purposes.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static long |
DEFAVAILABLE
The default sleep interval between available queries.
|
private static ThreadGroup |
DEFERRORGROUP
The thread group commands run in.
|
private static long |
DEFTIMEOUT
The default sleep interval between available queries.
|
private ThreadGroup |
errorgroup
The thread group to use for error handlers.
|
static String |
KEY_AVAILABLE
The key for sleep intervalls on available queries.
|
static String |
KEY_ERRORGROUP
The key in the properties for the alarm thread group.
|
static String |
KEY_TIMEOUT
The key for join-time on cancel.
|
private Object |
lockread
Used for locking during read.
|
private ErrorReceiver.ErrorHandler |
receive
The protocol handler for incoming errors.
|
KEY_BIND, KEY_BINDNAMEDEFSERVERPORT, handlerGroup, KEY_BUFFERSIZE, KEY_HANDLERPRIORITY, KEY_HOSTADDRESS, KEY_LOGOUT, KEY_RECEIVERNAME, KEY_SERVERPORT, KEY_SERVERPRIORITYALTERNATEHOST, ALTERNATEPORT, KEY_EXPORTPORT, KEY_REGISTRYHOST, KEY_REGISTRYPORTKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
ErrorReceiver(Map qualify)
Constructs a new receiver with the specified properties.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the parameter server.
|
protected void |
protocol(Socket client)
The method to handle the communication from the error-sending client
to this receiver.
|
exit, init, processErrorgetAsociatedThread, getBufferSize, getHandlerPriority, getReceiverName, getServerPort, getServerPriority, initReceiverServer, maxTimeToCancel, runaddErrorListener, addRmiErrorListener, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatusbindToRegistry, bindToRegistry, bindToRegistry, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, getBindName, getBindName, unbindFromRegistry, unbindFromRegistrycontainsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemotePropertyclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddRmiErrorListener, removeRmiErrorListenerbindToRegistry, isValid, unbindFromRegistrydefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_ERRORGROUP
public static final String KEY_TIMEOUT
public static final String KEY_AVAILABLE
private static final long DEFTIMEOUT
private static final ThreadGroup DEFERRORGROUP
private static final long DEFAVAILABLE
private final ThreadGroup errorgroup
private ErrorReceiver.ErrorHandler receive
private final Object lockread
public ErrorReceiver(Map qualify) throws RemoteException
RemoteExceptionpublic void cancel()
cancel in interface CancelRunnablecancel in class ReceiverServerprotected void protocol(Socket client)
ErrorReceiver.ErrorHandler thread that implements the
error-receiving protocol. The priority the handler thread should
run at is defined in the base class and is querried with the
ReceiverServer.getHandlerPriority() method.protocol in class ReceiverServerclient - The client socket.CommandReceiver,
ErrorReceiver