Class EndpointMediaTypes

java.lang.Object
org.springframework.boot.actuate.endpoint.web.EndpointMediaTypes

public class EndpointMediaTypes extends Object
Media types that are, by default, produced and consumed by an endpoint.
Since:
2.0.0
Author:
Andy Wilkinson
  • Field Details

  • Constructor Details

    • EndpointMediaTypes

      public EndpointMediaTypes(String... producedAndConsumed)
      Creates a new EndpointMediaTypes with the given produced and consumed media types.
      Parameters:
      producedAndConsumed - the default media types that are produced and consumed by an endpoint. Must not be null.
      Since:
      2.2.0
    • EndpointMediaTypes

      public EndpointMediaTypes(List<String> producedAndConsumed)
      Creates a new EndpointMediaTypes with the given produced and consumed media types.
      Parameters:
      producedAndConsumed - the default media types that are produced and consumed by an endpoint. Must not be null.
      Since:
      2.2.0
    • EndpointMediaTypes

      public EndpointMediaTypes(List<String> produced, List<String> consumed)
      Creates a new EndpointMediaTypes with the given produced and consumed media types.
      Parameters:
      produced - the default media types that are produced by an endpoint. Must not be null.
      consumed - the default media types that are consumed by an endpoint. Must not
  • Method Details

    • getProduced

      public List<String> getProduced()
      Returns the media types produced by an endpoint.
      Returns:
      the produced media types
    • getConsumed

      public List<String> getConsumed()
      Returns the media types consumed by an endpoint.
      Returns:
      the consumed media types