Class GlobalParameterInfo

java.lang.Object
org.acemq.rabbitmq.admin.GlobalParameterInfo

public final class GlobalParameterInfo extends Object
A cluster-wide parameter, which is not scoped to a virtual host.

Separate from ParameterInfo because the value is not the same shape. A vhost parameter's value is always an object — a federation upstream, a shovel definition — while a global parameter's may be anything the broker chose: internal_cluster_id is a string and cluster_tags is an array.

Modelling this with Map<String, Object> therefore fails to parse on any broker that has ever started, which is how this class came to exist.

  • Constructor Details

    • GlobalParameterInfo

      public GlobalParameterInfo(String name, Object value)
  • Method Details

    • name

      public String name()
    • value

      public Object value()
      Returns:
      the value, which may be a string, a number, a list or an object
    • asString

      public Optional<String> asString()
      Returns:
      the value when it is a string, such as internal_cluster_id
    • asList

      public List<Object> asList()
      Returns:
      the value when it is a list, such as cluster_tags
    • asMap

      public Map<String,Object> asMap()
      Returns:
      the value when it is an object
    • toString

      public String toString()
      Overrides:
      toString in class Object