stella.rmi
Class DistinctCaster
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiListener
stella.rmi.AbstractRmiCasterAndListener
stella.rmi.CasterTorso
stella.rmi.DistinctCaster
- All Implemented Interfaces:
- Cloneable, Remote, EventListener, Caster, CommandLaunching, ErrorSending, ErrorCaster, ReplyDeliverer, RmiAcknowledgeListener, RmiCommandCaster, RmiDoneListener, RmiErrorCaster, AlarmHandler, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, RmiCaster, RmiEventListener, RmiListener, RmiPropertyBearing
- Direct Known Subclasses:
- AdapterCaster, AuxiliaryCaster
public abstract class DistinctCaster
- extends CasterTorso
A concret caster client that can handle commands as found in its
KEY_HANDLE list. Additionally, commands found in the
KEY_DENY list are never handled. For commands not found in
either list, the subclass has to be more specific on the concrete
implementation of the handles(stella.CommandEvent) method.
| Methods inherited from class stella.rmi.CasterTorso |
addRmiCommandListener, announceInterest, castCommand, deregisterAtCaster, exit, getAcknowledgeTimeOut, getAlarmGroup, getClientName, getExitCommand, isReady, recastCommand, registerAtCaster, registerReplySubscriber, removeRmiCommandListener, rmiGotAcknowledge, rmiGotDone, setOff, toString |
| Methods inherited from class stella.rmi.AbstractRmiCasterAndListener |
addErrorListener, addRmiErrorListener, bindToRegistry, getBindName, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus, unbindFromRegistry |
| Methods inherited from class util.rmi.AbstractRmiListener |
allBound, blockBinding, blockBinding, disconnect, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, rescanned, startBinding, startBinding |
| 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, setObject, setProperties, setProperty, stringProperties |
| 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 |
KEY_HANDLE
public static final String KEY_HANDLE
- This links to a list of class names I can handle.
- See Also:
- Constant Field Values
KEY_DENY
public static final String KEY_DENY
- This links to a list of class names I won't handle.
- See Also:
- Constant Field Values
yes
private List<Class<? extends CommandEvent>> yes
- This list has class names I handle.
no
private List<Class<? extends CommandEvent>> no
- This list has class names I don't handle.
DistinctCaster
protected DistinctCaster(Map<String,String> prop)
throws RemoteException
- Constructs a new distinct handler Caster.
- Throws:
RemoteException
init
public void init()
- On init, we construct positive and negative lists.
- Specified by:
init in interface Initializable- Overrides:
init in class CasterTorso
handles
public boolean handles(CommandEvent ce)
- We look if the class we are asked for is in the positive or negative
list. If not, we call the abstract method
defaultHandles(stella.CommandEvent)
defaultHandles
public abstract boolean defaultHandles(CommandEvent ce)
- For classes not in the deny or allow list.
classList
public static List<Class<? extends CommandEvent>> classList(String comma)
- Constructs a list of command events from a comma separated string.