public class FitsRelay extends AbstractRmiListener implements RmiErrorListener, Initializable
FitsWrittn status messages
and relays them to a server listening on a special port, as defined in
the properties.| Modifier and Type | Class and Description |
|---|---|
static class |
FitsRelay.Rmi
Test by sending the path of the first command line argument to a
local server.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private boolean |
bound
Ture, if successfully registered to at least one listener.
|
private static int |
DEFSERVERPORT
The default server port.
|
static String |
KEY_RMIERROR
The key denoting a comma-separated list of rmi-error casters.
|
static String |
KEY_SERVERHOST
The key denoting the server host name.
|
static String |
KEY_SERVERPORT
The key denoting the server port on the specified host.
|
KEY_ALIVE, KEY_EXPORTPORT, KEY_INIT, KEY_LISTENERNAME, KEY_RETRY, KEY_RETRYSLEEP, KEY_SHUTDOWNDELAYKEY_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 |
|---|
FitsRelay(Map<String,String> prop)
We create a new error relay and start binding to the error casters in
the init section.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
deregisterAtCaster(RmiCaster rmi,
Class service)
Deregisters at caster.
|
void |
init()
We create a new list of local error listeners and start registering
at the remote error casters.
|
boolean |
isBound()
Return true, if we are bound to at least one error caster.
|
private void |
register(String list,
Class casterclass)
Registers at a caster list.
|
protected boolean |
registerAtCaster(RmiCaster rmi,
Class service)
Registers at the specified caster if the caster is one of the four
possible caster instances this class listens to.
|
private void |
relayFitsFile(File exist)
We start a thread to return immediately.
|
void |
rmiErrorOccured(ErrorEvent ee)
We pass the error received to our listeners.
|
allBound, blockBinding, blockBinding, disconnect, exit, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, rescanned, startBinding, startBindingcontainsRemoteProperty, 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, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetListenerNamedisconnect, isConnecteddefaultBoolean, 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_RMIERROR
public static final String KEY_SERVERHOST
public static final String KEY_SERVERPORT
private static final int DEFSERVERPORT
private boolean bound
public FitsRelay(Map<String,String> prop) throws RemoteException
RemoteExceptionpublic void init()
init in interface Initializablepublic boolean isBound()
public void rmiErrorOccured(ErrorEvent ee) throws RemoteException
rmiErrorOccured in interface RmiErrorListenerRemoteExceptionprotected boolean registerAtCaster(RmiCaster rmi, Class service)
registerAtCaster in class AbstractRmiListenerprotected boolean deregisterAtCaster(RmiCaster rmi, Class service)
deregisterAtCaster in class AbstractRmiListenerprivate void relayFitsFile(File exist)