public class DailyDumpRepository extends AbstractRmiListener implements RmiDataListener
KEY_LIST property and the
KEY_ASCIIFILE property should point to a comma-separated list of
equal dimension.| Modifier and Type | Class and Description |
|---|---|
private static class |
DailyDumpRepository.Parser
A command line parser class to allow direct parameter hand-over.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFBAD
The default good-weather indicator.
|
private static String |
DEFEXTENSION
The default dump file name.
|
private static String |
DEFGOOD
The default good-weather indicator.
|
private static double |
DEFNAN
The default nan replacement.
|
static String |
KEY_ASCIIFILE
The key linked to the dump files.
|
static String |
KEY_BAD
The key pointing to the string added for good weather.
|
static String |
KEY_GOOD
The key pointing to the string added for good weather.
|
static String |
KEY_LIST
The key linked to the sensor binds.
|
static String |
KEY_NAN
The key pointing to the replacement of NaN's.
|
static String |
KEY_PATH
The key pointing to the output dir.
|
private Map |
lastmap
The hash map used for linking sensor names to last data receives.
|
private Map |
namemap
The hash map used for linking sensor names to sensor files.
|
private List |
sensorbind
The list of sensor bind names.
|
private List |
sensordump
The list of sensor dump files.
|
private Map |
streammap
The hash map used for linking sensor names to file streams.
|
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 |
|---|
DailyDumpRepository(Map prop)
Constructs a new short-average repository.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
deregisterAtCaster(RmiCaster rmi,
Class single)
Registers at the given caster.
|
private String |
getFileHeader(String name)
Some header information.
|
protected void |
initDailyDumpRepository()
Initializes the short average repository.
|
static void |
main(String[] arg)
Starts the daily dump.
|
private String |
openStream(String sensor,
int mjd)
Opens the file as a stream for writing.
|
protected boolean |
registerAtCaster(RmiCaster rmi,
Class single)
Registers at the given caster.
|
void |
rmiDataAvailable(DataEvent de)
The data receiving edge of the repository.
|
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_LIST
public static final String KEY_PATH
public static final String KEY_ASCIIFILE
public static final String KEY_NAN
public static final String KEY_GOOD
public static final String KEY_BAD
private static final double DEFNAN
private static final String DEFGOOD
private static final String DEFBAD
private static final String DEFEXTENSION
private Map lastmap
private Map streammap
private Map namemap
private List sensorbind
private List sensordump
public DailyDumpRepository(Map prop) throws RemoteException
KEY_NAN, the KEY_BAD, and the KEY_GOOD
are assigned
with their default values, if not present in the properties.RemoteExceptionprotected void initDailyDumpRepository()
public void rmiDataAvailable(DataEvent de) throws RemoteException
rmiDataAvailable in interface RmiDataListenerRemoteExceptionprotected boolean registerAtCaster(RmiCaster rmi, Class single)
RmiDataCaster, the repository registers at it.registerAtCaster in class AbstractRmiListenerprotected boolean deregisterAtCaster(RmiCaster rmi, Class single)
RmiDataCaster, the repository registers at it.deregisterAtCaster in class AbstractRmiListenerprivate String openStream(String sensor, int mjd) throws IOException
getFileHeader(java.lang.String) is called and writtn as a file header.
To ensure proper closing of the file, a shutdown-hook is added to the system.
IOExceptionpublic static void main(String[] arg) throws ParseException, RemoteException
ParseExceptionRemoteException