abstract class ComponentHandlers extends AnyRef
Base class for component handlers which will be used by the component actor
- Alphabetic
- By Inheritance
- ComponentHandlers
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ComponentHandlers(ctx: ActorContext[TopLevelActorMessage], cswCtx: CswContext)
- ctx
the akka.actor.typed.scaladsl.ActorContext under which the actor instance of the component, which use these handlers, is created
- cswCtx
provides access to csw services e.g. location, event, alarm, etc
Abstract Value Members
- abstract def initialize(): Unit
The initialize handler is invoked when the component is created.
The initialize handler is invoked when the component is created. The component can initialize state such as configuration to be fetched from configuration service, location of components or services to be fetched from location service etc. These vary from component to component.
- returns
when the initialization of component completes
- abstract def onDiagnosticMode(startTime: UTCTime, hint: String): Unit
On receiving a diagnostic data command, the component goes into a diagnostic data mode based on hint at the specified startTime.
On receiving a diagnostic data command, the component goes into a diagnostic data mode based on hint at the specified startTime. Validation of supported hints need to be handled by the component writer.
- startTime
represents the time at which the diagnostic mode actions will take effect
- hint
represents supported diagnostic data mode for a component
- abstract def onGoOffline(): Unit
A component can be notified to run in offline mode in case it is not in use.
A component can be notified to run in offline mode in case it is not in use. The component can change its behavior if needed as a part of this handler.
- abstract def onGoOnline(): Unit
A component can be notified to run in online mode again in case it was put to run in offline mode.
A component can be notified to run in online mode again in case it was put to run in offline mode. The component can change its behavior if needed as a part of this handler.
- abstract def onLocationTrackingEvent(trackingEvent: TrackingEvent): Unit
The onLocationTrackingEvent handler can be used to take action on the TrackingEvent for a particular connection.
The onLocationTrackingEvent handler can be used to take action on the TrackingEvent for a particular connection. This event could be for the connections in ComponentInfo tracked automatically or for the connections tracked explicitly using trackConnection method.
- trackingEvent
represents a LocationUpdated or LocationRemoved event received for a tracked connection
- abstract def onOneway(runId: Id, controlCommand: ControlCommand): Unit
On receiving a command as Oneway, the onOneway handler is invoked for a component only if the validateCommand handler returns Accepted.
On receiving a command as Oneway, the onOneway handler is invoked for a component only if the validateCommand handler returns Accepted. In case a command is received as a oneway, command response should not be provided to the sender.
- controlCommand
represents a command received e.g. Setup, Observe or wait
- abstract def onOperationsMode(): Unit
On receiving a operations mode command, the current diagnostic data mode is halted.
- abstract def onShutdown(): Unit
The onShutdown handler can be used for carrying out the tasks which will allow the component to shutdown gracefully
The onShutdown handler can be used for carrying out the tasks which will allow the component to shutdown gracefully
- returns
when the shutdown completes for component
- abstract def onSubmit(runId: Id, controlCommand: ControlCommand): SubmitResponse
On receiving a command as Submit, the onSubmit handler is invoked for a component only if the validateCommand handler returns Accepted.
On receiving a command as Submit, the onSubmit handler is invoked for a component only if the validateCommand handler returns Accepted. In case a command is received as a submit, command response should be updated in the CommandResponseManager. CommandResponseManager is an actor whose reference commandResponseManager is available in the ComponentHandlers.
- controlCommand
represents a command received e.g. Setup, Observe or wait
- abstract def validateCommand(runId: Id, controlCommand: ControlCommand): ValidateCommandResponse
The validateCommand is invoked when a command is received by this component.
The validateCommand is invoked when a command is received by this component. The component is required to validate the ControlCommand received and return a validation result as Accepted or Invalid.
- controlCommand
represents a command received e.g. Setup, Observe or wait
- returns
a CommandResponse after validation
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- var isOnline: Boolean
A component can access this flag, which can be used to determine if the component is in the online or offline state.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def trackConnection(connection: Connection): Unit
Track any connection.
Track any connection. The handlers for received events are defined in onLocationTrackingEvent() method
- connection
to be tracked for location updates
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])