Package org.somda.sdc.glue.provider
Interface SdcDevicePlugin
- All Known Implementing Classes:
SdcRequiredTypesAndScopes
public interface SdcDevicePlugin
Definition 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 the LocalMdibAccess and OperationInvocationReceiver collection passed to
the SdcDevice constructor via SdcDeviceFactory.
All of the previously mentioned data is accessible through SdcDeviceContext.
The plugin mechanism can be used in order to run LocalMdibAccess controllers.
-
Method Summary
Modifier and TypeMethodDescriptiondefault 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 Details
-
beforeStartUp
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
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
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
Called after the device was shut down.This callback is triggered only if the device was running before, i.e.,
AbstractIdleService.isRunning()returned true.
-