public abstract class AbstractRmiCasterAndListener extends AbstractRmiListener implements RmiCaster, RmiErrorCaster, ErrorSending
AbstractRmiListener and has all methods of
AbstractRmiCaster copied into it.PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private List<ErrorListener> |
errlist
The vector containing local error listeners.
|
private List<RmiErrorListener> |
rmilist
The vector containing rmi error listeners.
|
KEY_ALIVE, KEY_EXPORTPORT, KEY_INIT, KEY_LISTENERNAME, KEY_RETRY, KEY_RETRYSLEEP, KEY_SHUTDOWNDELAYKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRmiCasterAndListener(Map prop)
Constructs a new rmi-caster.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorListener(ErrorListener ear)
Registers an error event listener to this property container.
|
void |
addRmiErrorListener(RmiErrorListener ear)
Registers a rmi error event listener to this property container.
|
boolean |
bindToRegistry()
Binds this class's casting capabilities to a running registry.
|
void |
exit()
Removes my rmi error listeners.
|
String |
getBindName()
Tries to retrieve my binding name.
|
boolean |
isValid()
The method for listeners to check if the remote reference is still
valid.
|
protected void |
notifyErrorListener(ErrorEvent ee,
List<ErrorListener> local,
List<RmiErrorListener> remote)
Notifies all registered ErrorListeners.
|
void |
removeErrorListener(ErrorListener ear)
Deregisters an error event listener from this property container.
|
void |
removeRmiErrorListener(RmiErrorListener ear)
Deregisters an rmi error event listener from this property container.
|
void |
sendError(ErrorEvent ee)
Sends the error message directly.
|
void |
sendError(String mess)
Wraps the argumental String into an error message and passes it to
the error listeners.
|
void |
sendError(Throwable thrown)
Wraps the argumental THrowable into an error message and passes it to
the error listeners.
|
void |
sendStatus(ErrorEvent ee)
Sends the status event back to registered listeners.
|
void |
sendStatus(List stati)
Processes an entire list of status messages that should be sent to
the error listeners.
|
void |
sendStatus(String mess)
Wraps the argumental String into an error message and passes it to
the error listeners.
|
boolean |
unbindFromRegistry()
Unbinds this repository from the registry.
|
allBound, blockBinding, blockBinding, deregisterAtCaster, disconnect, getIP, getListenerName, isConnected, listenerName, registerAtCaster, releaseBinding, releaseBinding, rescanned, startBinding, startBindingcontainsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemotePropertyclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, 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, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, 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, stringPropertiesprivate final List<ErrorListener> errlist
private final List<RmiErrorListener> rmilist
protected AbstractRmiCasterAndListener(Map prop)
public void exit()
exit in interface ExitCleaningexit in class AbstractRmiListenerpublic boolean isValid()
throws RemoteException
isValid in interface RmiCasterRemoteExceptionpublic boolean bindToRegistry()
throws RemoteException
bindToRegistry in interface RmiCasterRemoteExceptionpublic boolean unbindFromRegistry()
throws RemoteException
unbindFromRegistry in interface RmiCasterRemoteExceptionpublic String getBindName()
#mycast is a subclass of
AbstractRmiCaster this is no problem.public void addErrorListener(ErrorListener ear)
public void removeErrorListener(ErrorListener ear)
public void addRmiErrorListener(RmiErrorListener ear) throws RemoteException
addRmiErrorListener in interface RmiErrorCasterRemoteExceptionpublic void removeRmiErrorListener(RmiErrorListener ear) throws RemoteException
removeRmiErrorListener in interface RmiErrorCasterRemoteExceptionpublic void sendError(Throwable thrown)
public void sendError(String mess)
public void sendError(ErrorEvent ee)
sendError in interface ErrorSendingpublic void sendStatus(String mess)
public void sendStatus(List stati)
public void sendStatus(ErrorEvent ee)
ReceiverTorso.processCommand(stella.CommandEvent, int) method.notifyErrorListener(stella.ErrorEvent, java.util.List<stella.ErrorListener>, java.util.List<stella.rmi.RmiErrorListener>) method.protected void notifyErrorListener(ErrorEvent ee, List<ErrorListener> local, List<RmiErrorListener> remote)
ee - The ErrorEvent to pass to the Listeners.