MUM.data
Class IClientStateSynchronizer

java.lang.Object
  extended byMUM.data.IClientStateSynchronizer
All Implemented Interfaces:
java.io.Serializable

public class IClientStateSynchronizer
extends java.lang.Object
implements java.io.Serializable

This class implements a synchronizer to synchronize the ubiQoS client operations.

See Also:
Serialized Form

Field Summary
static java.lang.String CLIENT_DESTROYED
          In this state the needed software has been downloaded
static java.lang.String NOT_CONSISTENT
          In this state the client is in a not consistent state
static java.lang.String PLAYING
          In this state the UbiQoS client is playing
static java.lang.String STOPPED
          In this state the UbiQoS client is stopped
static java.lang.String SW_DOWNLOADED
          In this state the needed software has been downloaded
static java.lang.String SYSTEM_INITIALIZED
          In this state the distributed system has been initialized
static java.lang.String SYSTEM_RECONFIGURED
          In this state the system has been reconfigured
static java.lang.String WAITING_NEW_REQUESTS
          In this state the client is waiting new requests
 
Constructor Summary
IClientStateSynchronizer(java.io.PrintStream out)
           
 
Method Summary
 java.lang.String getCurrentState()
           
 java.lang.String getNextState()
           
 boolean isWaitingForNextState()
          Checks if there is anyone bloked because we are waiting for a change of the state
 void notifyState(java.lang.String changeToState)
          This method changes the current state and notifies this to all the other threads waiting for a state change
 void waitState(java.lang.String targetState)
          This method stops the thread until the target state (the parameter) is reached
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_CONSISTENT

public static final java.lang.String NOT_CONSISTENT
In this state the client is in a not consistent state

See Also:
Constant Field Values

SW_DOWNLOADED

public static final java.lang.String SW_DOWNLOADED
In this state the needed software has been downloaded

See Also:
Constant Field Values

WAITING_NEW_REQUESTS

public static final java.lang.String WAITING_NEW_REQUESTS
In this state the client is waiting new requests

See Also:
Constant Field Values

SYSTEM_INITIALIZED

public static final java.lang.String SYSTEM_INITIALIZED
In this state the distributed system has been initialized

See Also:
Constant Field Values

PLAYING

public static final java.lang.String PLAYING
In this state the UbiQoS client is playing

See Also:
Constant Field Values

STOPPED

public static final java.lang.String STOPPED
In this state the UbiQoS client is stopped

See Also:
Constant Field Values

SYSTEM_RECONFIGURED

public static final java.lang.String SYSTEM_RECONFIGURED
In this state the system has been reconfigured

See Also:
Constant Field Values

CLIENT_DESTROYED

public static final java.lang.String CLIENT_DESTROYED
In this state the needed software has been downloaded

See Also:
Constant Field Values
Constructor Detail

IClientStateSynchronizer

public IClientStateSynchronizer(java.io.PrintStream out)
Method Detail

waitState

public void waitState(java.lang.String targetState)
This method stops the thread until the target state (the parameter) is reached

Parameters:
targetState - the state we are waiting for

notifyState

public void notifyState(java.lang.String changeToState)
This method changes the current state and notifies this to all the other threads waiting for a state change


getCurrentState

public java.lang.String getCurrentState()

getNextState

public java.lang.String getNextState()

isWaitingForNextState

public boolean isWaitingForNextState()
Checks if there is anyone bloked because we are waiting for a change of the state



Copyright © 2004 Luca Foschini