stella.parameter
Class MyRmiListener

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by util.rmi.RmiPropertyContainer
                  extended by util.rmi.AbstractRmiListener
                      extended by stella.parameter.MyRmiListener
All Implemented Interfaces:
Cloneable, Remote, EventListener, RmiDataListener, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying, RmiEventListener, RmiListener, RmiPropertyBearing

public class MyRmiListener
extends AbstractRmiListener
implements RmiDataListener, Reloadable

A helper class that allows this parameter to benefit from RMI-enabled data transfer. Cannot be a inner class of RemoteSensorStub due to rmic-problems.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  DataListener data
          The data value reference that is served by this rmi-data listener.
 
Fields inherited from class util.rmi.AbstractRmiListener
KEY_ALIVE, KEY_EXPORTPORT, KEY_INIT, KEY_LISTENERNAME, KEY_RETRY, KEY_RETRYSLEEP, KEY_SHUTDOWNDELAY
 
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 MyRmiListener(Map info)
          Constructs a new helper class that is responsible for listener surveying.
 
Method Summary
protected  boolean deregisterAtCaster(RmiCaster caster, Class ignore)
          Checks if the rmi-caster is a rmi data caster.
protected  boolean registerAtCaster(RmiCaster caster, Class ignore)
          Checks if the rmi-caster is a rmi data caster.
 double rescanned(String key, String old, String newval)
          Makes this method public, no further changes.
 void rmiDataAvailable(DataEvent de)
          Receives a remote data event from a weather sensor.
protected  void setDataListener(DataListener serve)
          Sets the DataValue class that receives this rmi data events.
 
Methods inherited from class util.rmi.AbstractRmiListener
allBound, blockBinding, blockBinding, disconnect, exit, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, startBinding, startBinding
 
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, init, 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, 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.RmiEventListener
getListenerName
 
Methods inherited from interface util.rmi.RmiListener
disconnect, isConnected
 
Methods inherited from interface util.Reloadable
reload
 
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
 
Methods inherited from interface util.Initializable
init
 

Field Detail

data

private DataListener data
The data value reference that is served by this rmi-data listener.

Constructor Detail

MyRmiListener

protected MyRmiListener(Map info)
                 throws RemoteException
Constructs a new helper class that is responsible for listener surveying.

Throws:
RemoteException
Method Detail

rescanned

public double rescanned(String key,
                        String old,
                        String newval)
Makes this method public, no further changes.

Specified by:
rescanned in interface Reloadable
Overrides:
rescanned in class AbstractRmiListener

registerAtCaster

protected boolean registerAtCaster(RmiCaster caster,
                                   Class ignore)
Checks if the rmi-caster is a rmi data caster. If so this, stub registers to it as a data listener.

Specified by:
registerAtCaster in class AbstractRmiListener
Returns:
True, if this listener can register at the specified caster

deregisterAtCaster

protected boolean deregisterAtCaster(RmiCaster caster,
                                     Class ignore)
Checks if the rmi-caster is a rmi data caster. If so this, stub deregisters from it as a data listener.

Specified by:
deregisterAtCaster in class AbstractRmiListener
Returns:
True, if this listener can deregister at the specified caster

setDataListener

protected void setDataListener(DataListener serve)
Sets the DataValue class that receives this rmi data events.


rmiDataAvailable

public void rmiDataAvailable(DataEvent de)
                      throws RemoteException
Receives a remote data event from a weather sensor.

Specified by:
rmiDataAvailable in interface RmiDataListener
Throws:
RemoteException