util.rmi
Class AbstractRmiDataSink

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by util.rmi.RmiPropertyContainer
                  extended by util.rmi.AbstractRmiCaster
                      extended by util.rmi.AbstractRmiDataSink
All Implemented Interfaces:
Cloneable, Remote, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, RmiCaster, RmiDataSink, RmiPropertyBearing
Direct Known Subclasses:
JDataSink

public abstract class AbstractRmiDataSink
extends AbstractRmiCaster
implements RmiDataSink

A skeleton implementation of a data sink. #acceptsData and #metaData return true, #setData calls #clearData and #addData, thus only those two methods have to be implemented.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static boolean DEFBIND
          DEfault enables auto-binding.
static String KEY_BIND
          The key in the Map referring to auto-binding on init.
 
Fields inherited from class util.rmi.AbstractRmiCaster
ALTERNATEHOST, ALTERNATEPORT, KEY_BINDNAME, KEY_EXPORTPORT, KEY_REGISTRYHOST, KEY_REGISTRYPORT
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
protected AbstractRmiDataSink(Map<String,String> prop)
          Constructs a new data sink.
 
Method Summary
 void init()
          On init, we also bind to the registry, if requested with KEY_BIND.
 boolean rmiAcceptsData(String any)
          Returns true.
 boolean rmiAddData(List<VectorG> data)
          For small data sets this method suffices to deviate to the #addData(Map) method.
 boolean rmiMetaData(Map<String,? extends Serializable> m)
          Returns true.
 boolean rmiSetData(List<VectorG> data)
          Sets the data by calling clear and add with the vector list.
 boolean rmiSetData(Map<Object,VectorG> d)
          Sets the data by calling clear and then adding the data map.
 
Methods inherited from class util.rmi.AbstractRmiCaster
bindAlternate, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, exit, getBindName, getBindName, isValid, unbindFromRegistry, unbindFromRegistry
 
Methods inherited from class util.rmi.RmiPropertyContainer
containsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemoteProperty
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
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, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.rmi.RmiDataSink
rmiAddData, rmiClearData
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, 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, stringProperties
 

Field Detail

KEY_BIND

public static final String KEY_BIND
The key in the Map referring to auto-binding on init.

See Also:
Constant Field Values

DEFBIND

private static final boolean DEFBIND
DEfault enables auto-binding.

See Also:
Constant Field Values
Constructor Detail

AbstractRmiDataSink

protected AbstractRmiDataSink(Map<String,String> prop)
                       throws RemoteException
Constructs a new data sink.

Throws:
RemoteException
Method Detail

init

public void init()
On init, we also bind to the registry, if requested with KEY_BIND.

Specified by:
init in interface Initializable
Overrides:
init in class PropertyResources

rmiAcceptsData

public boolean rmiAcceptsData(String any)
                       throws RemoteException
Returns true.

Specified by:
rmiAcceptsData in interface RmiDataSink
Returns:
True, if this sink might use thi type of data.
Throws:
RemoteException

rmiMetaData

public boolean rmiMetaData(Map<String,? extends Serializable> m)
                    throws RemoteException
Returns true.

Specified by:
rmiMetaData in interface RmiDataSink
Returns:
False, if we cannot interprete data with the information available.
Throws:
RemoteException

rmiSetData

public boolean rmiSetData(List<VectorG> data)
                   throws RemoteException
Sets the data by calling clear and add with the vector list.

Specified by:
rmiSetData in interface RmiDataSink
Returns:
True, if we can interprete this data.
Throws:
RemoteException

rmiAddData

public boolean rmiAddData(List<VectorG> data)
                   throws RemoteException
For small data sets this method suffices to deviate to the #addData(Map) method. On huge data set, you may override this to increase performance.

Specified by:
rmiAddData in interface RmiDataSink
Returns:
True, if we can interprete this data.
Throws:
RemoteException

rmiSetData

public boolean rmiSetData(Map<Object,VectorG> d)
                   throws RemoteException
Sets the data by calling clear and then adding the data map.

Specified by:
rmiSetData in interface RmiDataSink
Throws:
RemoteException