|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable jap.forward.JAPRoutingUseableMixCascades
public final class JAPRoutingUseableMixCascades
This class manages the useable mixcascades for the clients of the local forwarding server. So they get always an up-to-date list of running and allowed mixcascades.
Field Summary | |
---|---|
(package private) boolean |
m_allowAllAvailableCascades
This stores, whether the access to all available mixcascades shall be allowed for the clients of the local forwarding server (true) or it shall be restricted to some cascades (false). |
(package private) java.util.Hashtable |
m_allowedMixCascades
This stores the list of allowed mixcascades. |
(package private) java.util.Hashtable |
m_currentlyRunningMixCascades
This stores the list of currently running mixcascades. |
(package private) java.lang.Thread |
m_updateMixCascadesListThread
This stores the instance of the update thread for the mixcascades. |
private static long |
MIXCASCADELIST_UPDATE_INTERVAL
This is the update interval of the mixcascade list. |
Constructor Summary | |
---|---|
JAPRoutingUseableMixCascades()
This creates a new instance of JAPRoutingUseableMixCascades. |
Method Summary | |
---|---|
void |
addToAllowedMixCascades(MixCascade a_mixCascade)
This adds a MixCascade to the list of allowed mixcascades for the clients of the local forwarding server. |
boolean |
getAllowAllAvailableMixCascades()
Returns the restriction mode. |
java.util.Vector |
getAllowedMixCascades()
Returns a clone of the list of allowed mixcascades for the forwarding server. |
org.w3c.dom.Element |
getSettingsAsXml(org.w3c.dom.Document a_doc)
Returns the current settings for the allowed forwarding mixcascades (allowed cascades, whether all running mixcascades are allowed) for storage within an XML document. |
boolean |
loadSettingsFromXml(org.w3c.dom.Element a_allowedMixCascadesSettingsNode)
This method loads all settings for the allowed mixcascades for the forwarding server from a prior created XML structure. |
void |
removeFromAllowedMixCascades(java.lang.String a_mixCascadeId)
This removes a MixCascade from the list of allowed mixcascades for the clients of the local forwarding server. |
void |
run()
This is the implementation of the mixcascades management thread for the local forwarding server. |
void |
setAllowAllAvailableMixCascades(boolean a_allowAllAvailableCascades)
This changes the restriction mode for the clients between no restriction (access to all running mixcascades is allowed) or restriction to the list of allowed mixcascades, which needs to be also running. |
void |
setAllowedMixCascades(java.util.Vector a_mixCascades)
This changes the list of allowed mixcascades for the clients of the local forwarding server. |
private void |
startMixCascadesListUpdateThread()
This starts the management thread for the useable mixcascades of the local forwarding server, if it is not already running. |
private void |
stopMixCascadesListUpdateThread()
This stops the management thread for the useable mixcascades of the local forwarding server, if it is running. |
void |
update(java.util.Observable a_notifier,
java.lang.Object a_message)
This is the observer implementation to observe the instance of JAPRoutingSettings. |
private void |
updateUseableCascadesDatabase()
Updates the ForwardServerDatabase, which contains the currently useable mixcascades for the clients of the local forwarding server. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long MIXCASCADELIST_UPDATE_INTERVAL
java.util.Hashtable m_allowedMixCascades
boolean m_allowAllAvailableCascades
java.util.Hashtable m_currentlyRunningMixCascades
java.lang.Thread m_updateMixCascadesListThread
Constructor Detail |
---|
public JAPRoutingUseableMixCascades()
Method Detail |
---|
public void update(java.util.Observable a_notifier, java.lang.Object a_message)
update
in interface java.util.Observer
a_notifier
- The observed Object. This should always be JAPRoutingSettings at the moment.a_message
- The reason of the notification. This should always be a JAPRoutingMessage
at the moment.public void setAllowedMixCascades(java.util.Vector a_mixCascades)
a_mixCascades
- A Vector of mixcascades, which shall be allowed for the clients of the
local forwarding server in the restricted mode.public void addToAllowedMixCascades(MixCascade a_mixCascade)
a_mixCascade
- The MixCascade which should added to the list of allowed mixcascades for
the restricted mode. If there is already a mixcascade with the same ID in
the list, it is updated to this new cascade value.public void removeFromAllowedMixCascades(java.lang.String a_mixCascadeId)
a_mixCascadeId
- The MixCascade which should removed from the list of allowed
mixcascades for the restricted mode. If there is no mixcascade with
this ID is in the list, nothing is done.public java.util.Vector getAllowedMixCascades()
public void setAllowAllAvailableMixCascades(boolean a_allowAllAvailableCascades)
a_allowAllAvailableCascades
- Whether access to all available mixcascades shall be
granted (true) or only to set of explicitly allowed
mixcascades (false).public boolean getAllowAllAvailableMixCascades()
public org.w3c.dom.Element getSettingsAsXml(org.w3c.dom.Document a_doc)
a_doc
- The context document for the forwarding mixcascades settings.
public boolean loadSettingsFromXml(org.w3c.dom.Element a_allowedMixCascadesSettingsNode)
a_infoServiceRegistrationSettingsNode
- The AllowedMixCascadesSettings XML node,
which was created by the getSettingsAsXml()
method.
public void run()
run
in interface java.lang.Runnable
private void updateUseableCascadesDatabase()
private void startMixCascadesListUpdateThread()
private void stopMixCascadesListUpdateThread()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |