Package gda.jython
Class InterfaceProvider
java.lang.Object
gda.jython.InterfaceProvider
Static methods to get current implementation for various interfaces supported by JythonServerFacade and JythonServer
that are used by other classes in GDA.
Provided to ensure loose coupling between callers and command runner implementation. Allows the use of mock versions of the interfaces to allow stand alone testing
-
Method Summary
Modifier and TypeMethodDescriptionstatic AliasedCommandProviderstatic IAuthorisationHolderstatic IBatonStateProviderstatic ICommandAborterstatic ICommandRunnerstatic ICommandThreadInfoProviderstatic TextCompleterstatic ICurrentScanControllerstatic IDefaultScannableProviderstatic JSFObserverstatic IJythonNamespacestatic IJythonServerNotiferstatic IJythonServerStatusProviderstatic IPathConstructorstatic IScanDataPointProviderstatic IScanStatusHolderstatic IScriptControllerstatic ITerminalPrinterstatic voidsetAliasedCommandProvider(AliasedCommandProvider aliasedCommandProvider) static voidsetAuthorisationHolderForTesting(IAuthorisationHolder authorisationHolder) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetBatonStateProviderForTesting(IBatonStateProvider batonStateProvider) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetCommandRunnerForTesting(ICommandRunner commandRunner) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetCurrentScanControllerForTesting(ICurrentScanController currentScanController) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetCurrentScanInformationHolderForTesting(ICurrentScanInformationHolder currentScanHolder) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetDefaultScannableProviderForTesting(IDefaultScannableProvider defaultScannableProvider) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetJSFObserverForTesting(JSFObserver jSFObserver) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetJythonNamespaceForTesting(IJythonNamespace jythonNamespace) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetJythonServerNotiferForTesting(IJythonServerNotifer jythonServerNotifer) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetJythonServerStatusProviderForTesting(IJythonServerStatusProvider jythonServerStatusProvider) static voidsetPanicStopForTesting(ICommandAborter panicStop) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetPathConstructorForTesting(IPathConstructor pathConstructor) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetScanDataPointProviderForTesting(IScanDataPointProvider scanDataPointProvider) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetScanStatusHolderForTesting(IScanStatusHolder scanStatusHolder) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetScriptControllerForTesting(IScriptController scriptController) call this only when you wish to run outside of gda when JythonServer does not existstatic voidsetTerminalPrinterForTesting(ITerminalPrinter terminalPrinter) call this only when you wish to run outside of gda when JythonServer does not exist
-
Method Details
-
getAliasedCommandProvider
- Returns:
- current selected implementation of ICommandRunner
-
getCommandRunner
- Returns:
- current selected implementation of ICommandRunner
-
getCommandThreadInfoProvider
- Returns:
- current selected implementation of ICommandRunner
-
getCurrentScanController
- Returns:
- current selected implementation of ICurrentScanController
-
getTerminalPrinter
- Returns:
- current selected implementation of ITerminalPrinter
-
getScanStatusHolder
- Returns:
- current selected implementation of IScanStatusHolder
-
getScriptController
- Returns:
- current selected implementation of IScriptStatusHolder
-
getCommandAborter
- Returns:
- current selected implementation of IScriptStatusHolder
-
getJythonNamespace
- Returns:
- current selected implementation of IJythonNamespace
-
getCurrentScanInformationHolder
- Returns:
- current selected implementation of ICurrentScanInformation
-
getJythonServerNotifer
- Returns:
- current selected implementation of IJythonServerNotifer
-
getDefaultScannableProvider
- Returns:
- current selected implementation of IDefaultScannableProvider
-
getAuthorisationHolder
- Returns:
- current selected implementation of IAuthorisationHolder
-
getScanDataPointProvider
- Returns:
- current selected implementation of IScanDataPointProvider
-
setJSFObserverForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
jSFObserver-
-
getJSFObserver
- Returns:
- current selected implementation of JSFObserver
-
setScanDataPointProviderForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
scanDataPointProvider-
-
setCommandRunnerForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
commandRunner-
-
setCurrentScanControllerForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
currentScanController-
-
setTerminalPrinterForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
terminalPrinter-
-
setScanStatusHolderForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
scanStatusHolder-
-
setPanicStopForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
panicStop-
-
setScriptControllerForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
scriptController-
-
setJythonNamespaceForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
jythonNamespace-
-
setCurrentScanInformationHolderForTesting
public static void setCurrentScanInformationHolderForTesting(ICurrentScanInformationHolder currentScanHolder) call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
currentScanHolder-
-
setJythonServerNotiferForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
jythonServerNotifer-
-
setDefaultScannableProviderForTesting
public static void setDefaultScannableProviderForTesting(IDefaultScannableProvider defaultScannableProvider) call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
defaultScannableProvider-
-
setAuthorisationHolderForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
authorisationHolder-
-
getBatonStateProvider
- Returns:
- current selected implementation of IBatonStateProvider
-
getCompleter
-
getPathConstructor
-
setPathConstructorForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
pathConstructor-
-
setBatonStateProviderForTesting
call this only when you wish to run outside of gda when JythonServer does not exist- Parameters:
batonStateProvider-
-
setAliasedCommandProvider
-
getJythonServerStatusProvider
-
setJythonServerStatusProviderForTesting
public static void setJythonServerStatusProviderForTesting(IJythonServerStatusProvider jythonServerStatusProvider)
-