Class Exporter

java.lang.Object
io.deephaven.plugin.type.Exporter

public class Exporter extends Object
Utility to export objects while writing a payload to send to the client.
  • Constructor Details

    • Exporter

      public Exporter()
  • Method Details

    • reference

      @Deprecated(since="0.27.0") public Optional<Exporter.Reference> reference(Object object, boolean allowUnknownType, boolean forceNew)
      Deprecated.
      Please use reference(Object) instead - as of 0.27.0, the parameters allowUnknownType and forceNew can only be set to true going forward.
      Gets the reference for object if it has already been created and forceNew is false, otherwise creates a new one. If allowUnknownType is false, and no type can be found, no reference will be created. Uses reference-based equality.
      Parameters:
      object - the object
      allowUnknownType - if an unknown-typed reference can be created
      forceNew - if a new reference should be created
      Returns:
      the reference
    • reference

      @Deprecated(since="0.27.0") public Optional<Exporter.Reference> reference(Object object, boolean allowUnknownType, boolean forceNew, BiPredicate<Object,Object> equals)
      Deprecated.
      Please use reference(Object) instead - as of 0.27.0, the parameters allowUnknownType and forceNew can only be set to true going forward.
      Gets the reference for object if it has already been created and forceNew is false, otherwise creates a new one. If allowUnknownType is false, and no type can be found, no reference will be created.
      Parameters:
      object - the object
      allowUnknownType - if an unknown-typed reference can be created
      forceNew - if a new reference should be created
      equals - the equals logic - unused.
      Returns:
      the reference
    • outputStream

      public OutputStream outputStream()
    • payload

      public ByteBuffer payload()
    • references

      public Object[] references()
    • reference

      public Exporter.Reference reference(Object object)
      Creates a new reference for the provided object. A reference will be created and the object exported even if the object has no corresponding plugin provided, granting the client the ability to reference the object on later calls, and requiring that they release it when no longer needed.
      Parameters:
      object - the object
      Returns:
      the reference