|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiCaster
stella.CastingContainer
stella.AbstractCommandLauncher
stella.MasterLauncher
public class MasterLauncher
The CommandLaunching instance for master commands. Master commands
are internally handled commands that may appear in a sequence definition.
To allow the sequencer to cast this command as remote command to remote
CommandLaunching instances, this class acts as the 'missing link'.
Note that this class is highly specific in the sense that internal
commands will in most cases not be recognizable on different systems.
This class also acts as a ReplyDeliverer though it is not
an acknowledge or done caster. Reply events are only generated if they
match
To allow the SCS to cast errors similar to other CommandLaunching
instances, this class extends the CastingContainer class.
Additionally, RmiCommandCaster may be enabled. The
rmi-casting capabilities are intended for remote logging only.
| Nested Class Summary | |
|---|---|
protected class |
MasterLauncher.MasterHelper
The master launcher helper thread. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private MasterMind |
chef
The master mind. |
private List |
command
The list of rmi-command listeners. |
private static double |
DEFACCELERATE
The default acceleration factor. |
private static boolean |
DEFBIND
The default error-binding behaviour. |
private static String |
DEFNAME
The default name of the master launcher (SCS). |
private static long |
DEFSHUTDOWNDELAY
The default shutdown delay time, 5 sec. |
private static String |
DEFSTARTGRAB
The default start-grab script. |
private static String |
DEFSTOPGRAB
The default start-grab script. |
private ReplySubscriber |
forward
The registered reply subscriber. |
static String |
KEY_ACCELERATE
The key matching possible acceleration of the internal counter. |
static String |
KEY_BIND
The key matching the default error casting binding. |
static String |
KEY_BINDNAME
The key linked to the server name. |
static String |
KEY_NAME
The key linked to the client's name. |
static String |
KEY_SHUTDOWNDELAY
The time delay from receiving quit-command until orderly shutdown. |
static String |
KEY_STARTGRAB
The key to the command line for starting the grabbing. |
static String |
KEY_STOPGRAB
The key to the command line for starting the grabbing. |
private List |
pattern
The replies the reply subscriber is interested in. |
private AlarmWatch |
stopwatch
An alarm to act as an interruptable stop-watch. |
| Fields inherited from class util.rmi.AbstractRmiCaster |
|---|
ALTERNATEHOST, ALTERNATEPORT, 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 stella.rmi.RmiCommandCaster |
|---|
NAMING_EXTENSION |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
MasterLauncher(Map prop)
Constructs a new master launcher with the specified properties. |
|
| Method Summary | |
|---|---|
void |
addRmiCommandListener(RmiCommandListener ear)
Registers a command listener to the master launcher. |
void |
announceInterest(ReplyEvent re)
Adds a new reply event pattern to the pattern list. |
void |
castCommand(CommandEvent ce)
Cast the command to the SCS. |
void |
cont()
For times the guiding was lost. |
void |
exit()
Unbind thyself from the rwgistry. |
String |
getBindName()
Returns the name of the master launcher used for readability improvement. |
String |
getClientName()
Returns the name of the master launcher used for readability improvement. |
CommandEvent |
getExitCommand()
Default implementation of exit command is null. |
CommandEvent |
getShutdownCommand()
Returns the shutdown command. |
void |
halt()
For times the guiding was lost. |
boolean |
handles(CommandEvent ce)
The master launcher handles ScsCommands. |
void |
init()
Initializes the master launcher. |
boolean |
isReady()
This is an internal command launcher. |
protected void |
processCommand(CommandEvent ce)
The method to handle internal (master) commands. |
void |
recastCommand()
Empty method. |
protected void |
registerMasterMind(MasterMind sub)
Registers the reply subscriber. |
void |
registerReplySubscriber(ReplySubscriber sub)
Registers the reply subscriber. |
void |
removeRmiCommandListener(RmiCommandListener ear)
Deregisters a command listener to the master launcher. |
| Methods inherited from class stella.AbstractCommandLauncher |
|---|
createCommandLauncher |
| Methods inherited from class stella.CastingContainer |
|---|
addErrorListener, addRmiErrorListener, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus |
| Methods inherited from class util.rmi.AbstractRmiCaster |
|---|
bindAlternate, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, getBindName, 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 stella.ErrorCaster |
|---|
addErrorListener, removeErrorListener |
| Methods inherited from interface stella.rmi.RmiErrorCaster |
|---|
addRmiErrorListener, removeRmiErrorListener |
| Methods inherited from interface util.rmi.RmiCaster |
|---|
bindToRegistry, isValid, unbindFromRegistry |
| 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.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Field Detail |
|---|
public static final String KEY_NAME
public static final String KEY_BINDNAME
public static final String KEY_BIND
public static final String KEY_ACCELERATE
public static final String KEY_STARTGRAB
public static final String KEY_STOPGRAB
public static final String KEY_SHUTDOWNDELAY
private static final String DEFNAME
private static final boolean DEFBIND
private static final double DEFACCELERATE
private static final String DEFSTARTGRAB
private static final String DEFSTOPGRAB
private static final long DEFSHUTDOWNDELAY
private ReplySubscriber forward
private List pattern
private AlarmWatch stopwatch
private List command
private MasterMind chef
| Constructor Detail |
|---|
public MasterLauncher(Map prop)
throws RemoteException
DEFNAME.
Binding the rmi error-caster to the registry is defined with the
KEY_BIND property. The default setting is
DEFBIND. The binding name used is defined with
KEY_BINDNAME, defaults to DEFNAME.
RemoteException| Method Detail |
|---|
public void init()
init in interface Initializableinit in class PropertyResourcespublic void exit()
exit in interface ExitCleaningexit in class CastingContainerpublic CommandEvent getExitCommand()
getExitCommand in interface CommandLaunchingpublic void registerReplySubscriber(ReplySubscriber sub)
registerReplySubscriber in interface ReplyDeliverersub - The reply subscriber interested in received replies.protected void registerMasterMind(MasterMind sub)
sub - The reply subscriber interested in received replies.public void announceInterest(ReplyEvent re)
castCommand(stella.CommandEvent)). Note that handling of multiple acknowledge
commands is not possible in a master launcher.
announceInterest in interface ReplyDelivererpublic String getClientName()
getClientName in interface CommandLaunchingpublic String getBindName()
getBindName in class AbstractRmiCasterpublic CommandEvent getShutdownCommand()
ParkMaster
command.
getShutdownCommand in interface CommandLaunchingpublic boolean isReady()
isReady in interface CommandLaunchingpublic boolean handles(CommandEvent ce)
ScsCommands.
handles in interface CommandLaunchingpublic void castCommand(CommandEvent ce)
processCommand(stella.CommandEvent) method. Additionally, it checks for
registered acknloedge events prior to the call to this method and for
registered done events after this method returns.
castCommand in interface CommandLaunching
public void addRmiCommandListener(RmiCommandListener ear)
throws RemoteException
addRmiCommandListener in interface RmiCommandCasterRemoteException
public void removeRmiCommandListener(RmiCommandListener ear)
throws RemoteException
removeRmiCommandListener in interface RmiCommandCasterRemoteExceptionpublic void recastCommand()
recastCommand in interface CommandLaunchingpublic void halt()
cont() method is called.
public void cont()
halt() method has been called.
protected void processCommand(CommandEvent ce)
ReceiverTorso class).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||