public class ParameterRelay extends ReceiverServer
RemoteParameters. The
functionality is as follows.
startServer() method it
aquires a listening state on the port defined by #KEY_PORT.ParameterRelay.ParameterHandler thread.
This thread reads in the name of the parameter to be querried from
the client.RemoteParameter
instance, it is stored in the look-up list for further reference.
The remote paramter is then queried with its
RemoteParameter.remoteGet() method to deliver the object requested.
| Modifier and Type | Class and Description |
|---|---|
protected class |
ParameterRelay.ParameterHandler
The helper class to run the protocol for ascii-based parameter
exchanges.
|
static class |
ParameterRelay.Run
Runs the parameter realy.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static long |
DEFTIMEOUT
The default sleep interval between available queries.
|
static String |
KEY_HOST
The key to the host where the registry runs.
|
static String |
KEY_TIMEOUT
The key for join-time on cancel.
|
private Map |
lookup
The look-up table matching names to remote parameters.
|
private static ThreadGroup |
parameterGroup
The thread group commands run in.
|
private Registry |
registry
The registry, where parameters are look-up.
|
private ParameterRelay.ParameterHandler |
request
The handler for dealing with parameter queries.
|
DEFSERVERPORT, handlerGroup, KEY_BUFFERSIZE, KEY_HANDLERPRIORITY, KEY_HOSTADDRESS, KEY_LOGOUT, KEY_RECEIVERNAME, KEY_SERVERPORT, KEY_SERVERPRIORITYALTERNATEHOST, ALTERNATEPORT, KEY_BINDNAME, 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 |
|---|
ParameterRelay(Map prop)
Constructs a new parameter server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the parameter server.
|
protected void |
protocol(Socket client)
The method called as soon as a connection is established.
|
void |
startServer()
Starts the server.
|
exit, getAsociatedThread, getBufferSize, getHandlerPriority, getReceiverName, getServerPort, getServerPriority, init, initReceiverServer, maxTimeToCancel, processError, 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, waitdefaultBoolean, 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_HOST
public static final String KEY_TIMEOUT
private static final long DEFTIMEOUT
private static final transient ThreadGroup parameterGroup
private ParameterRelay.ParameterHandler request
private Map lookup
private Registry registry
public ParameterRelay(Map prop) throws RemoteException
startServer().RemoteExceptionpublic void startServer()
ReceiverServer.ReceiverServer(Map), which also sets
the server priority.public void cancel()
cancel in interface CancelRunnablecancel in class ReceiverServerprotected void protocol(Socket client)
ParameterRelay.ParameterHandler thread witch performs the actual
communication.protocol in class ReceiverServerclient - The client socket.CommandReceiver,
ErrorReceiver