Package csw.framework.javadsl
Class JComponentHandlers
- java.lang.Object
- 
- csw.framework.scaladsl.ComponentHandlers
- 
- csw.framework.javadsl.JComponentHandlers
 
 
- 
 public abstract class JComponentHandlers extends csw.framework.scaladsl.ComponentHandlersBase class for component handlers which will be used by the component actorparam: ctx the ActorContextunder which the actor instance of the component, which use these handlers, is created param: cswCtx provides access to csw services e.g. location, event, alarm, etc
- 
- 
Constructor SummaryConstructors Constructor Description JComponentHandlers(akka.actor.typed.javadsl.ActorContext<TopLevelActorMessage> ctx, JCswContext cswCtx)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description scala.concurrent.ExecutionContextExecutorec()scala.concurrent.Future<scala.runtime.BoxedUnit>initialize()Invokes the java helper (jInitialize) to initialize the componentabstract java.util.concurrent.CompletableFuture<java.lang.Void>jInitialize()A Java helper that is invoked when the component is created.abstract java.util.concurrent.CompletableFuture<java.lang.Void>jOnShutdown()The onShutdown handler can be used for carrying out the tasks which will allow the component to shutdown gracefullyscala.concurrent.Future<scala.runtime.BoxedUnit>onShutdown()Invokes the java helper (jOnShutdown) to shutdown the component
 
- 
- 
- 
Constructor Detail- 
JComponentHandlerspublic JComponentHandlers(akka.actor.typed.javadsl.ActorContext<TopLevelActorMessage> ctx, JCswContext cswCtx) 
 
- 
 - 
Method Detail- 
ecpublic scala.concurrent.ExecutionContextExecutor ec() 
 - 
initializepublic scala.concurrent.Future<scala.runtime.BoxedUnit> initialize() Invokes the java helper (jInitialize) to initialize the componentNote: do not override this from java class - Specified by:
- initializein class- csw.framework.scaladsl.ComponentHandlers
- Returns:
- a future which completes when jInitialize completes
 
 - 
jInitializepublic abstract java.util.concurrent.CompletableFuture<java.lang.Void> jInitialize() A Java helper that is invoked when the component is created. This is different than constructor initialization to allow non-blocking asynchronous operations. 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:
- a CompletableFuture which completes when the initialization of component completes
 
 - 
jOnShutdownpublic abstract java.util.concurrent.CompletableFuture<java.lang.Void> jOnShutdown() The onShutdown handler can be used for carrying out the tasks which will allow the component to shutdown gracefully- Returns:
- a CompletableFuture which completes when the shutdown completes for component
 
 - 
onShutdownpublic scala.concurrent.Future<scala.runtime.BoxedUnit> onShutdown() Invokes the java helper (jOnShutdown) to shutdown the componentNote: do not override this from java class - Specified by:
- onShutdownin class- csw.framework.scaladsl.ComponentHandlers
- Returns:
- a future which completes when the jOnShutdown completes
 
 
- 
 
-