stella.net
Class PilarLauncher

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 stella.CastingContainer
                          extended by stella.AbstractCommandLauncher
                              extended by stella.net.PilarLauncher
All Implemented Interfaces:
Cloneable, Remote, CommandLaunching, ReplyDeliverer, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, RmiCaster, RmiPropertyBearing

public class PilarLauncher
extends AbstractCommandLauncher


Nested Class Summary
static class PilarLauncher.Test
          Test
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  Pilar3Socket pilar
           
 
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.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
PilarLauncher(Map prop)
           
 
Method Summary
 void announceInterest(ReplyEvent rpl)
          The method a reply subscriber calls to announce that it is interested to be forwarded reply events matching re.
 void castCommand(CommandEvent ce)
          The interface to the command casting routine.
 String getClientName()
          Returns the name of this command launcher.
 CommandEvent getExitCommand()
          Returns the command that should be sent on a server exit.
 CommandEvent getShutdownCommand()
          Returns the command that initiates a shutdown on the device or prepares it for a shutdown.
 boolean handles(CommandEvent ce)
          Returns true if the caster can handles this command event.
 void init()
          Loads URL-resources, if there are any.
 boolean isReady()
          Returns true if the device is ready to receive commands.
 void recastCommand()
          Resends the last command, stops acknowledge/done waits.
 void registerReplySubscriber(ReplySubscriber sub)
          Registers the reply subscriber.
 
Methods inherited from class stella.AbstractCommandLauncher
createCommandLauncher
 
Methods inherited from class stella.CastingContainer
addErrorListener, addRmiErrorListener, exit, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus
 
Methods inherited from class util.rmi.AbstractRmiCaster
bindAlternate, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, getBindName, 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 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

pilar

private Pilar3Socket pilar
Constructor Detail

PilarLauncher

public PilarLauncher(Map prop)
Method Detail

init

public void init()
Description copied from class: PropertyResources
Loads URL-resources, if there are any.

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

castCommand

public void castCommand(CommandEvent ce)
Description copied from interface: CommandLaunching
The interface to the command casting routine.


recastCommand

public void recastCommand()
Description copied from interface: CommandLaunching
Resends the last command, stops acknowledge/done waits.


announceInterest

public void announceInterest(ReplyEvent rpl)
Description copied from interface: ReplyDeliverer
The method a reply subscriber calls to announce that it is interested to be forwarded reply events matching re.


registerReplySubscriber

public void registerReplySubscriber(ReplySubscriber sub)
Description copied from interface: ReplyDeliverer
Registers the reply subscriber. Only one reply subscriber may be specified.


getExitCommand

public CommandEvent getExitCommand()
Description copied from interface: CommandLaunching
Returns the command that should be sent on a server exit. If the master mind dies (its VM exits), one of the last things it should do is send this command to the servers, if they request these.


getShutdownCommand

public CommandEvent getShutdownCommand()
Description copied from interface: CommandLaunching
Returns the command that initiates a shutdown on the device or prepares it for a shutdown.


handles

public boolean handles(CommandEvent ce)
Description copied from interface: CommandLaunching
Returns true if the caster can handles this command event.


getClientName

public String getClientName()
Description copied from interface: CommandLaunching
Returns the name of this command launcher.


isReady

public boolean isReady()
Description copied from interface: CommandLaunching
Returns true if the device is ready to receive commands.