jap.forward
Class JAPRoutingSettingsPropagandaThreadLock

java.lang.Object
  extended by jap.forward.JAPRoutingSettingsPropagandaThreadLock

public class JAPRoutingSettingsPropagandaThreadLock
extends java.lang.Object

This class is used for synchronization between the threads, when startPropaganda() is called.


Field Summary
private  boolean m_propagandaThreadReady
          Stores whether the propaganda thread has come to the end (true) or not (false).
private  int m_registrationStatus
          Stores the status of the forwarding server registration process at the infoservices.
 
Constructor Summary
JAPRoutingSettingsPropagandaThreadLock()
          This constructs a new JAPRoutingSettingsPropagandaThreadLock.
 
Method Summary
 int getRegistrationStatus()
          Returns the status of the registration process of the local forwarding server at the infoservices.
 boolean isPropagandaThreadReady()
          Returns whether the propaganda thread has come to the end (registered the forwarding server at all specified infoservices or was interrupted while registering).
 void propagandaThreadIsReady()
          Sets the propagandaThreadReady value to the ready state (propaganda thread has come to the end.
 void registrationWasInterrupted()
          Sets the internal registration status to the interrupted state.
 void updateRegistrationStatus(ServerSocketPropagandist a_currentPropagandist)
          Updates the stored registration status according to the status of the supplied ServerSocketPropagandist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_propagandaThreadReady

private boolean m_propagandaThreadReady
Stores whether the propaganda thread has come to the end (true) or not (false).


m_registrationStatus

private int m_registrationStatus
Stores the status of the forwarding server registration process at the infoservices. See the REGISTRATION constants in JAPRoutingSettings;

See Also:
JAPRoutingSettings
Constructor Detail

JAPRoutingSettingsPropagandaThreadLock

public JAPRoutingSettingsPropagandaThreadLock()
This constructs a new JAPRoutingSettingsPropagandaThreadLock. The propagandaThreadReady value is set to false. The registration status is set to JAPRoutingSettings.REGISTRATION_NO_INFOSERVICES.

Method Detail

propagandaThreadIsReady

public void propagandaThreadIsReady()
Sets the propagandaThreadReady value to the ready state (propaganda thread has come to the end.


isPropagandaThreadReady

public boolean isPropagandaThreadReady()
Returns whether the propaganda thread has come to the end (registered the forwarding server at all specified infoservices or was interrupted while registering).

Returns:
True, if the propaganda thread is ready or false, if it is still working.

updateRegistrationStatus

public void updateRegistrationStatus(ServerSocketPropagandist a_currentPropagandist)
Updates the stored registration status according to the status of the supplied ServerSocketPropagandist.

Parameters:
a_currentPropagandist - The ServerSocketPropagandist, which is used for updating the internal stored registration status. So it is considered, if you call getRegistrationStatus() later.

registrationWasInterrupted

public void registrationWasInterrupted()
Sets the internal registration status to the interrupted state.

See Also:
JAPRoutingSettings.REGISTRATION_INTERRUPTED

getRegistrationStatus

public int getRegistrationStatus()
Returns the status of the registration process of the local forwarding server at the infoservices. See the REGISTRATION constants in JAPConfRouting.

Returns:
The status of the registration process.
See Also:
JAPConfRouting