Class ColumnRestrictionRegistry

java.lang.Object
io.deephaven.web.client.api.barrage.util.ColumnRestrictionRegistry

public class ColumnRestrictionRegistry extends Object
Registry for column restriction converters. Built-in restriction types are handled by typed subclasses of ColumnRestriction and are pre-registered here. Downstream consumers can register additional custom types via register(java.lang.String, io.deephaven.web.client.api.barrage.util.ColumnRestrictionConverter); their converter must return a concrete subclass that overrides validate() as needed.
  • Constructor Details

    • ColumnRestrictionRegistry

      public ColumnRestrictionRegistry()
  • Method Details

    • register

      public static void register(String typeUrl, ColumnRestrictionConverter converter)
      Register a converter for a custom column restriction type. The converter is responsible for returning a concrete ColumnRestriction subclass that implements validate() as needed.
      Parameters:
      typeUrl - The full protobuf Any type URL (e.g., "docs.deephaven.io/io.deephaven.proto.backplane.grpc.MyCustomRestriction")
      converter - Converts a protobuf Any message into a typed ColumnRestriction
    • convert

      public static Optional<ColumnRestriction> convert(com.google.protobuf.Any restrictionAny) throws ColumnRestrictionConverterException
      Converts the given Any to a ColumnRestriction, if possible. Returns empty if the type is unknown, or throws if the data is invalid for the given type.
      Parameters:
      restrictionAny - The Any restriction to convert
      Returns:
      An optional containing the converted ColumnRestriction, or empty if the type is unknown
      Throws:
      ColumnRestrictionConverterException - if the data cannot be converted