public class ParameterServer extends ErrorServer implements ErrorCaster, GlobalDepending
SocketParameter. The
functionality is as follows.
startServer() method it
aquires a listening state on the port defined by #KEY_PORT.ParameterServer.ParameterHandler thread.
This thread reads in the name of the parameter to be querried from
the client.SocketParameter
instance. Its SocketParameter.getAscii() method is used to
serialize the parameter value into a string.| Modifier and Type | Class and Description |
|---|---|
protected class |
ParameterServer.ParameterHandler
The helper class to run the protocol for ascii-based parameter
exchanges.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static long |
DEFTIMEOUT
The default sleep interval between available queries.
|
static String |
KEY_TIMEOUT
The key for join-time on cancel.
|
private static ThreadGroup |
parameterGroup
The thread group commands run in.
|
private ParameterServer.ParameterHandler |
request
The handler for dealing with parameter queries.
|
private GlobalGrouping |
set
The reference to the parameters served.
|
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 |
|---|
ParameterServer(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 |
registerGlobals(GlobalGrouping toserve)
Registers the set of parameters served by this parameter server.
|
void |
startServer()
Starts the server.
|
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, waitaddErrorListener, removeErrorListeneraddRmiErrorListener, 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_TIMEOUT
private static final long DEFTIMEOUT
private GlobalGrouping set
private static final transient ThreadGroup parameterGroup
private ParameterServer.ParameterHandler request
public ParameterServer(Map prop) throws RemoteException
startServer().
SocketParameters
should be added prior to starting the parameter server, otherwise
synchronization on the look-up table may cause time delays.RemoteExceptionpublic void registerGlobals(GlobalGrouping toserve)
registerGlobals in interface GlobalDependingpublic 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)
ParameterServer.ParameterHandler thread witch performs the actual
communication.protocol in class ReceiverServerclient - The client socket.CommandReceiver,
ErrorReceiver