Package gda.jython.batoncontrol
Class BatonManager
java.lang.Object
gda.jython.batoncontrol.BatonManager
- All Implemented Interfaces:
IBatonManager
Component used by JythonServer to manage the list of clients registered to that server. If enabled, there is a baton which can be 'requested' by one of the
client which prevents the other clients from operating equipment. The baton can be passed from the holder to another client, or taken from a client by a
higher level user, or released by the holder. If no one holds the baton then any client can operate equipment.
09 Oct 2015
}
invalid @link
{@link <a href="http://jira.diamond.ac.uk/browse/DATAACQTEAM-154">DATAACQTEAM-154</a>
Changes made to stop accessing the fields of ClientInfo directly as this causes IllegalAccessExceptions under OSGI due to the split package problem. Instead the (already present) mutators are now used
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFacade(String uniqueID, ClientDetails info) Register a new facade to this classbooleanamIBatonHolder(String myJSFIdentifier) voidassignBaton(String myJSFIdentifier, int indexOfReciever, int indexOfPasser) inteffectiveAuthorisationLevelOf(String uniqueID) Determines the current authorisation level of the given client.Returns details of all connected clients.getClientInformation(String myJSFIdentifier) intgetOtherClientInformation(String myJSFIdentifier) booleanbooleanbooleanisJSFRegistered(String myJSFIdentifier) voidremoveFacade(String uniqueID) Remove a facade registered in this classbooleanrequestBaton(String uniqueIdentifier) voidreturnBaton(String uniqueIdentifier) voidsetDisableControlOverVisitMetadataEntry(boolean disableControlOverVisitMetadataEntry) voidswitchUser(String uniqueFacadeName, String username, int accessLevel, String visitID) Switches the user of the given facade.
-
Constructor Details
-
BatonManager
public BatonManager()
-
-
Method Details
-
effectiveAuthorisationLevelOf
Description copied from interface:IBatonManagerDetermines the current authorisation level of the given client. If this server has RBAC enabled and another client holds the baton then the effective level is 0.- Specified by:
effectiveAuthorisationLevelOfin interfaceIBatonManager- Parameters:
uniqueID- The UUID of the client facade- Returns:
- the effective authorisation level
-
addFacade
Description copied from interface:IBatonManagerRegister a new facade to this class- Specified by:
addFacadein interfaceIBatonManager- Parameters:
uniqueID-info-
-
switchUser
Description copied from interface:IBatonManagerSwitches the user of the given facade.- Specified by:
switchUserin interfaceIBatonManager- Parameters:
uniqueFacadeName-username-accessLevel-visitID-
-
removeFacade
Description copied from interface:IBatonManagerRemove a facade registered in this class- Specified by:
removeFacadein interfaceIBatonManager- Parameters:
uniqueID-
-
getNewFacadeIndex
public int getNewFacadeIndex()- Specified by:
getNewFacadeIndexin interfaceIBatonManager
-
amIBatonHolder
- Specified by:
amIBatonHolderin interfaceIBatonManager- Parameters:
myJSFIdentifier-- Returns:
- boolean
- See Also:
-
assignBaton
- Specified by:
assignBatonin interfaceIBatonManager- Parameters:
myJSFIdentifier-indexOfReciever-indexOfPasser-- See Also:
-
getClientInformation
- Specified by:
getClientInformationin interfaceIBatonManager- Parameters:
myJSFIdentifier-- Returns:
- ClientDetails
-
getOtherClientInformation
- Specified by:
getOtherClientInformationin interfaceIBatonManager- Parameters:
myJSFIdentifier-- Returns:
- ClientDetails[]
- See Also:
-
requestBaton
- Specified by:
requestBatonin interfaceIBatonManager- Parameters:
uniqueIdentifier-- Returns:
- boolean
- See Also:
-
returnBaton
- Specified by:
returnBatonin interfaceIBatonManager- Parameters:
uniqueIdentifier-- See Also:
-
isJSFRegistered
- Specified by:
isJSFRegisteredin interfaceIBatonManager- Parameters:
myJSFIdentifier-- Returns:
- true if the given id string matches one registered by this class
-
isBatonHeld
public boolean isBatonHeld()- Specified by:
isBatonHeldin interfaceIBatonManager- Returns:
- boolean
- See Also:
-
isDisableControlOverVisitMetadataEntry
public boolean isDisableControlOverVisitMetadataEntry()- Specified by:
isDisableControlOverVisitMetadataEntryin interfaceIBatonManager
-
setDisableControlOverVisitMetadataEntry
public void setDisableControlOverVisitMetadataEntry(boolean disableControlOverVisitMetadataEntry) - Specified by:
setDisableControlOverVisitMetadataEntryin interfaceIBatonManager
-
getAllClients
Description copied from interface:IBatonManagerReturns details of all connected clients.- Specified by:
getAllClientsin interfaceIBatonManager
-