public class SensorDump extends AbstractRmiListener implements RmiDataListener, RmiDataDump, Initializable
Shelf and
dumped into an ASCII-file on dump(java.io.File).
Deployment note: This class was successfully exported in a running 1.8
registry
by copying the RmiDataDump class in the classpath of the running
registry, then starting this class on an alternate class path.
| Modifier and Type | Class and Description |
|---|---|
private static class |
SensorDump.SensorMeasurement |
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private Shelf<SensorDump.SensorMeasurement> |
cache |
private static int |
DEFSHELFSIZE
Default 30 days at 1 Hz.
|
static String |
KEY_BIND
The key pointing to the binding name of the rmi-data caster.
|
static String |
KEY_SHELFSIZE
The length of the average cycle.
|
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 |
|---|
SensorDump(Map<String,String> prop)
Constructs a new sensor dump instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
deregisterAtCaster(RmiCaster caster,
Class<?> ignored)
Deregisters at the appropriate caster.
|
void |
dump(File to)
The method called by registered data event casters.
|
void |
init() |
static void |
main(String[] arg)
Adds the first command line argument as the binding name.
|
protected boolean |
registerAtCaster(RmiCaster caster,
Class<?> ignored)
Registers at the appropriate caster.
|
void |
rmiDataAvailable(DataEvent de)
The data receiving edge.
|
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_SHELFSIZE
public static final String KEY_BIND
private static final int DEFSHELFSIZE
private Shelf<SensorDump.SensorMeasurement> cache
public SensorDump(Map<String,String> prop) throws RemoteException
RemoteExceptionpublic void init()
throws InitException
init in interface InitializableInitExceptionpublic void rmiDataAvailable(DataEvent de) throws RemoteException
rmiDataAvailable in interface RmiDataListenerRemoteExceptionpublic void dump(File to) throws RemoteException
RmiDataDumpdump in interface RmiDataDumpRemoteExceptionprotected boolean registerAtCaster(RmiCaster caster, Class<?> ignored)
registerAtCaster in class AbstractRmiListenerprotected boolean deregisterAtCaster(RmiCaster caster, Class<?> ignored)
deregisterAtCaster in class AbstractRmiListenerpublic static void main(String[] arg) throws InitException, RemoteException
IOExceptionInitExceptionRemoteException