Package org.somda.sdc.glue.provider
Interface SdcDevicePlugin
-
- All Known Implementing Classes:
SdcRequiredTypesAndScopes
public interface SdcDevicePluginDefinition of a plugin for SdcDevice that is called back on different stages of startup and shutdown.Every callback provides full control of
Device. There is also access to theLocalMdibAccessandOperationInvocationReceivercollection passed to theSdcDeviceconstructor viaSdcDeviceFactory.All of the previously mentioned data is accessible through
SdcDeviceContext.The plugin mechanism can be used in order to run
LocalMdibAccesscontrollers.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidafterShutDown(SdcDeviceContext context)Called after the device was shut down.default voidafterStartUp(SdcDeviceContext context)Called once the device is running.default voidbeforeShutDown(SdcDeviceContext context)Called before the device is about to shutdown.default voidbeforeStartUp(SdcDeviceContext context)Called before the device starts up.
-
-
-
Method Detail
-
beforeStartUp
default void beforeStartUp(SdcDeviceContext context) throws Exception
Called before the device starts up.- Parameters:
context- all accessibleSdcDevicedata.- Throws:
Exception- any exception thrown will immediately stop the device from continuing startup. Calls forafterStartUp(SdcDeviceContext),beforeShutDown(SdcDeviceContext)andafterShutDown(SdcDeviceContext)are omitted. No further plugin calls for this function are going to be invoked after.
-
afterStartUp
default void afterStartUp(SdcDeviceContext context) throws Exception
Called once the device is running.This callback is triggered only if the device was running before, i.e.,
AbstractIdleService.isRunning()returned true.- Parameters:
context- all accessibleSdcDevicedata.- Throws:
Exception- any exception thrown will immediately stop the device from continuing startup. Calls forbeforeShutDown(SdcDeviceContext)andafterShutDown(SdcDeviceContext)are omitted. No further plugin calls for this function are going to be invoked after.
-
beforeShutDown
default void beforeShutDown(SdcDeviceContext context) throws Exception
Called before the device is about to shutdown.This callback is triggered only if the device was running before, i.e.,
AbstractIdleService.isRunning()returned true.- Parameters:
context- all accessibleSdcDevicedata.- Throws:
Exception- any exception thrown does not stop the device from shutting down. A message is sent to the logger, any subsequent plugins will be invoked and internal device functions will be stopped.afterShutDown(SdcDeviceContext)is still going to be invoked.
-
afterShutDown
default void afterShutDown(SdcDeviceContext context) throws Exception
Called after the device was shut down.This callback is triggered only if the device was running before, i.e.,
AbstractIdleService.isRunning()returned true.
-
-