Package gda.jython

Interface IBatonStateProvider

All Known Implementing Classes:
BatonStateProviderBean, JythonServerFacade, MockJythonServerFacade

public interface IBatonStateProvider
  • Method Details

    • isBatonHeld

      boolean isBatonHeld()
      This checks if the baton is held, at all, by any client. It does not check it the caller is the baton holder.
      Returns:
      true if the baton is held by any client, false otherwise
      See Also:
    • addBatonChangedObserver

      void addBatonChangedObserver(gda.observable.IObserver anObserver)
      Parameters:
      anObserver -
    • deleteBatonChangedObserver

      void deleteBatonChangedObserver(gda.observable.IObserver anObserver)
      Parameters:
      anObserver -
    • amIBatonHolder

      boolean amIBatonHolder()
      Checks if the caller is the holder of the baton
      Returns:
      true if the caller holds the baton false otherwise
      See Also:
    • getBatonHolder

      ClientDetails getBatonHolder()
      Returns the baton holder from the list of known clients connected, even if the baton holder is this client.
      Returns:
      ClientDetails
    • returnBaton

      void returnBaton()
      See Also:
    • requestBaton

      boolean requestBaton()
      Returns:
      boolean
      See Also:
    • assignBaton

      void assignBaton(int receiverIndex, int currentBatonHolderIndex)
      Parameters:
      receiverIndex -
      currentBatonHolderIndex -
      See Also:
    • getOtherClientInformation

      ClientDetails[] getOtherClientInformation()
      Returns:
      ClientDetails[]
      See Also:
    • getMyDetails

      ClientDetails getMyDetails()
      Returns the current ClientDetails for this client. What is returned will change depending on the baton status and if the user has been switched using the switchUser method.

      The authorisationLevel returned takes into account any alternate user, but not whether the baton is held. For this, call getAuthorisationLevel().

      Returns:
      ClientDetails
    • update

      void update(Object dataSource, Object data)
      Parameters:
      dataSource -
      data -
    • revertToOriginalUser

      void revertToOriginalUser()
      Reverts to the original user this client was initially logged in as.
      See Also:
    • changeVisitID

      void changeVisitID(String visitID)
      Switches the visit this client will collect data as when it holds the baton.
      Parameters:
      visitID -
    • sendMessage

      void sendMessage(String message)
      Broadcast a message to other users on this beamline. Such messages will be displayed in a special viewer.
      Parameters:
      message -
    • getMessageHistory

      List<UserMessage> getMessageHistory()
      Returns previous messages sent during this visit.
    • switchUser

      boolean switchUser(String username, String password)
      Parameters:
      username -
      password -
      Returns:
      true if switch successful
      See Also: