Class CoreContext

All Implemented Interfaces:
Context
Direct Known Subclasses:
EndpointContext, IoContext, NodeContext, ObserveContext, RequestContext, ServiceContext

public class CoreContext extends AbstractContext
The CoreContext is bound to a core and provides both exportable and usable state for the rest of the application to use.
Since:
2.0.0
  • Constructor Details

  • Method Details

    • id

      public long id()
      A (app local) unique ID per core instance.
    • environment

      public CoreEnvironment environment()
      The attached environment for this core.
    • alternateAddress

      @Deprecated public Optional<String> alternateAddress()
      Deprecated.
      Always return an empty optional. Alternate addresses are now resolved immediately when parsing cluster topology.
    • authenticator

      public Authenticator authenticator()
      Returns the authenticator used for this core.
    • alternateAddress

      @Internal @Deprecated public CoreContext alternateAddress(Optional<String> alternateAddress)
      Deprecated.
      This method does not do anything.
      Returns:
      the same CoreContext for chaining purposes.
    • core

      public Core core()
      Returns the core to which this context belongs.
    • injectExportableParams

      public void injectExportableParams(Map<String,Object> input)
      Description copied from class: AbstractContext
      This method needs to be implemented by the actual context implementations to inject the params they need for exporting.
      Overrides:
      injectExportableParams in class AbstractContext
      Parameters:
      input - pass exportable params in here.