|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable jap.forward.JAPRoutingRegistrationInfoServices
public class JAPRoutingRegistrationInfoServices
This class manages the infoservices, where the registration of the local forwarding server is tried.
Field Summary | |
---|---|
private static long |
INFOSERVICELIST_UPDATE_INTERVAL
If the automatic management of the registration infoservices (registrate at all available infoservices) is enabled, this constant is the update interval of the infoservice list in milliseconds. |
(package private) boolean |
m_propagandaIsRunning
This stores, whether propaganda for the local forwarding server is running at the moment (true) or not (false). |
(package private) boolean |
m_registerAtAllAvailableInfoServices
This stores, whether the automatic management mode for the registration at the infoservices is used (true) or the manual mode with the stored list of registration infoservices is used (false). |
(package private) java.util.Hashtable |
m_registrationInfoServices
This stores the list of infoservices, where the registration is tried, if we are not in the automatic management mode. |
(package private) java.util.Vector |
m_runningInfoServiceRegistrations
This stores the list of infoservice IDs, where the local forwarding server is already registrated or it is tried to registrate. |
(package private) java.lang.Thread |
m_updateInfoServiceListThread
This stores the instance of the automatic infoservice registration management thread. |
Constructor Summary | |
---|---|
JAPRoutingRegistrationInfoServices()
This creates a new instance of JAPRoutingRegistrationInfoServices. |
Method Summary | |
---|---|
void |
addToRegistrationInfoServices(InfoServiceDBEntry a_infoService)
This adds a primary InfoService to the list of registration infoservices, which is used, if we are in manual infoservice registration mode. |
boolean |
getRegisterAtAllAvailableInfoServices()
Returns the current setting of the management mode. |
java.util.Vector |
getRegistrationInfoServices()
Returns a clone of the list of infoservices, which shall be used, if we are in manual infoservice registration management mode. |
java.util.Vector |
getRegistrationInfoServicesForStartup()
This returns a list of infoservices, where the startPropaganda() method of JAPRoutingSettings shall try the registration. |
org.w3c.dom.Element |
getSettingsAsXml(org.w3c.dom.Document a_doc)
Returns the current settings for the registration of the forwarding server at the infoservice system (registration infoservices, whether to registrate at all running primary infoservices) for storage within an XML document. |
boolean |
loadSettingsFromXml(org.w3c.dom.Element a_infoServiceRegistrationSettingsNode)
This method loads all settings for the registration of the forwarding server at the infoservice system (registration infoservices, whether to registrate at all running primary infoservices) from a prior created XML structure. |
void |
removeFromRegistrationInfoServices(java.lang.String a_infoServiceId)
This removes an InfoService from the list of registration infoservices, which is used, if we are in manual infoservice registration mode. |
void |
run()
This is the implementation of the automatic infoservice registration management thread. |
void |
setRegisterAtAllAvailableInfoServices(boolean a_registerAtAllAvailableInfoServices)
This changes the management mode between automatic infoservice registration and manual infoservice registration. |
void |
setRegistrationInfoServices(java.util.Vector a_infoServices)
This changes the list of registration infoservices, which are used, if we are in manual infoservice registration mode. |
private void |
startInfoServiceListUpdateThread()
This starts the automatic infoservice registration thread, if it is not already running. |
private void |
stopInfoServiceListUpdateThread()
This stops the automatic infoservice registration thread, 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. |
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 INFOSERVICELIST_UPDATE_INTERVAL
java.util.Hashtable m_registrationInfoServices
boolean m_registerAtAllAvailableInfoServices
boolean m_propagandaIsRunning
java.util.Vector m_runningInfoServiceRegistrations
java.lang.Thread m_updateInfoServiceListThread
Constructor Detail |
---|
public JAPRoutingRegistrationInfoServices()
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 setRegistrationInfoServices(java.util.Vector a_infoServices)
a_infoServices
- A Vector of primary infoservices, which shall be used for registration,
if we are in manual management mode.public void addToRegistrationInfoServices(InfoServiceDBEntry a_infoService)
a_infoServices
- A primary Infoservice, which shall be added to the list of registration
infoservices for the manual management mode. If there is already an
InfoService with the same ID is in the list, it is updated to this new
value (but the propaganda keeps running with the old instance until a
restart of the whole propaganda system).public void removeFromRegistrationInfoServices(java.lang.String a_infoServiceId)
a_infoServiceId
- The InfoService which should be removed from the list of registration
infoservices for the manual registration mode. If there is no
infoservice with this ID is in the list, nothing is done.public java.util.Vector getRegistrationInfoServices()
public java.util.Vector getRegistrationInfoServicesForStartup()
public void setRegisterAtAllAvailableInfoServices(boolean a_registerAtAllAvailableInfoServices)
a_registerAtAllAvailableInfoService
- Is this value is true, the automatic management
mode is used, if it is false, the manual
management mode is used.public boolean getRegisterAtAllAvailableInfoServices()
public org.w3c.dom.Element getSettingsAsXml(org.w3c.dom.Document a_doc)
a_doc
- The context document for the infoservice registration settings.
public boolean loadSettingsFromXml(org.w3c.dom.Element a_infoServiceRegistrationSettingsNode)
a_infoServiceRegistrationSettingsNode
- The InfoServiceRegistrationSettings XML node,
which was created by the getSettingsAsXml()
method.
public void run()
run
in interface java.lang.Runnable
private void startInfoServiceListUpdateThread()
private void stopInfoServiceListUpdateThread()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |