Class ServiceContextImpl<S extends Service<?>>

java.lang.Object
org.refcodes.servicebus.ServiceContextImpl<S>
Type Parameters:
S - The type to be used for the Service.
All Implemented Interfaces:
org.refcodes.component.ext.observer.ObservableLifecycleAutomatonAccessor, ServiceBusAccessor<S>, ServiceContext<S>

public class ServiceContextImpl<S extends Service<?>> extends Object implements ServiceContext<S>
  • Constructor Details

    • ServiceContextImpl

      public ServiceContextImpl(ServiceBus<S> aServiceBus, org.refcodes.component.ext.observer.ObservableLifecycleStatusAutomaton aObservableLifecycleAutomaton)
      Constructs the ServiceContextImpl to be configured with the given ObservableLifecycleStatusAutomaton.
      Parameters:
      aServiceBus - The ServiceBus with which to construct the ServiceContextImpl.
      aObservableLifecycleAutomaton - The ObservableLifecycleStatusAutomaton with which to construct the ServiceContextImpl.
  • Method Details

    • getObservableLifecycleAutomaton

      public org.refcodes.component.ext.observer.ObservableLifecycleStatusAutomaton getObservableLifecycleAutomaton()
      Specified by:
      getObservableLifecycleAutomaton in interface org.refcodes.component.ext.observer.ObservableLifecycleAutomatonAccessor
    • getServiceBus

      public ServiceBus<S> getServiceBus()
      Retrieves the ServiceBus property from the property.
      Specified by:
      getServiceBus in interface ServiceBusAccessor<S extends Service<?>>
      Returns:
      Returns the ServiceBus property stored by the property.