Class IoContext

All Implemented Interfaces:

public class IoContext extends CoreContext
The IoContext is used to extend the core context with IO related metadata that is useful during event generation.
  • Constructor Details

    • IoContext

      public IoContext(CoreContext ctx, SocketAddress localSocket, SocketAddress remoteSocket, Optional<String> bucket)
      Creates a new IO Context.
      ctx - the core context as a parent.
      localSocket - the local io socket.
      remoteSocket - the remote io socket.
      bucket - the bucket name, if it makes sense.
  • Method Details

    • 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.
      injectExportableParams in class CoreContext
      input - pass exportable params in here.
    • localSocket

      public SocketAddress localSocket()
      Returns the local socket.
    • remoteSocket

      public SocketAddress remoteSocket()
      Returns the remote socket.
    • localHostname

      public String localHostname()
      Returns the local hostname, might be null if not available.
    • localPort

      public int localPort()
      Returns the local port, might be 0 if not available.
    • bucket

      public Optional<String> bucket()
      Returns the bucket name if present.