Class ReceiverBase

All Implemented Interfaces:
ContextAware, LifeCycle
Direct Known Subclasses:
ServerSocketReceiver, SocketReceiver

public abstract class ReceiverBase extends ContextAwareBase implements LifeCycle
An abstract base for components that receive logging events from a remote peer and log according to local policy
Carl Harris
  • Constructor Details

  • Method Details

    • start

      public final void start()
      Specified by:
      start in interface LifeCycle
    • stop

      public final void stop()
      Specified by:
      stop in interface LifeCycle
    • isStarted

      public final boolean isStarted()
      Specified by:
      isStarted in interface LifeCycle
    • shouldStart

      protected abstract boolean shouldStart()
      Determines whether this receiver should start.

      Subclasses will implement this method to do any subclass-specific validation. The subclass's getRunnableTask() method will be invoked (and the task returned will be submitted to the executor) if and only if this method returns true

      flag indicating whether this receiver should start
    • onStop

      protected abstract void onStop()
      Allows a subclass to participate in receiver shutdown.
    • getRunnableTask

      protected abstract Runnable getRunnableTask()
      Provides the runnable task this receiver will execute.
      runnable task