Class ServiceBrokerRequest

java.lang.Object
org.springframework.cloud.servicebroker.model.ServiceBrokerRequest
Direct Known Subclasses:
AsyncServiceBrokerRequest, GetLastServiceBindingOperationRequest, GetLastServiceOperationRequest, GetServiceInstanceBindingRequest, GetServiceInstanceRequest

public class ServiceBrokerRequest extends Object
Details common to all service broker requests.
Author:
Scott Frederick, Roy Clarkson
  • Field Details

    • API_INFO_LOCATION_HEADER

      public static final String API_INFO_LOCATION_HEADER
      API Info Location header.
      See Also:
    • ORIGINATING_IDENTITY_HEADER

      public static final String ORIGINATING_IDENTITY_HEADER
      API Originating Identity header.
      See Also:
    • REQUEST_IDENTITY_HEADER

      public static final String REQUEST_IDENTITY_HEADER
      API Request Identity header.
      See Also:
    • INSTANCE_ID_PATH_VARIABLE

      public static final String INSTANCE_ID_PATH_VARIABLE
      Instance ID path variable name.
      See Also:
    • BINDING_ID_PATH_VARIABLE

      public static final String BINDING_ID_PATH_VARIABLE
      Binding ID path variable name.
      See Also:
    • SERVICE_ID_PARAMETER

      public static final String SERVICE_ID_PARAMETER
      Service ID parameter name.
      See Also:
    • PLAN_ID_PARAMETER

      public static final String PLAN_ID_PARAMETER
      Plan ID parameter name.
      See Also:
    • PLATFORM_INSTANCE_ID_VARIABLE

      public static final String PLATFORM_INSTANCE_ID_VARIABLE
      Platform Instance ID variable name.
      See Also:
    • platformInstanceId

      protected transient String platformInstanceId
    • apiInfoLocation

      protected transient String apiInfoLocation
    • originatingIdentity

      protected transient Context originatingIdentity
    • requestIdentity

      protected transient String requestIdentity
  • Constructor Details

    • ServiceBrokerRequest

      public ServiceBrokerRequest()
      Construct a new ServiceBrokerRequest.
    • ServiceBrokerRequest

      protected ServiceBrokerRequest(String platformInstanceId, String apiInfoLocation, Context originatingIdentity, String requestIdentity)
      Construct a new ServiceBrokerRequest.
      Parameters:
      platformInstanceId - the platform instance ID
      apiInfoLocation - location of the API info endpoint of the platform instance
      originatingIdentity - identity of the user that initiated the request from the platform
      requestIdentity - identity of the request being sent from the platform
  • Method Details

    • getPlatformInstanceId

      public String getPlatformInstanceId()
      Get the ID used to identify the platform instance.

      This is useful when the service broker is registered to multiple instances of a platform.

      This value is set from any path element that precedes /v2 in the request from the platform. Will be null if the service broker is not registered with an instance ID in the registration URL.

      Returns:
      the platform instance ID, or null if not provided
    • setPlatformInstanceId

      public void setPlatformInstanceId(String platformInstanceId)
      This method is intended to be used internally only; use a builder to construct an object of this type and set all field values.
      Parameters:
      platformInstanceId - the platform instance ID
    • getApiInfoLocation

      public String getApiInfoLocation()
      Get the location of the API info endpoint of the platform instance.

      This endpoint can be used to retrieve additional information about the platform making the request on platforms that support the header.

      This value is set from the X-Api-Info-Location header in the request from the platform.

      Returns:
      the API info endpoint location, or null if not provided
    • setApiInfoLocation

      public void setApiInfoLocation(String apiInfoLocation)
      This method is intended to be used internally only; use a builder to construct an object of this type and set all field values.
      Parameters:
      apiInfoLocation - location of the API info endpoint of the platform instance
    • getOriginatingIdentity

      public Context getOriginatingIdentity()
      Get the identity of the user that initiated the request from the platform.

      This value is set from the X-Broker-API-Originating-Identity header in the request from the platform.

      Returns:
      the user identity, or null if not provided
    • setOriginatingIdentity

      public void setOriginatingIdentity(Context originatingIdentity)
      This method is intended to be used internally only; use a builder to construct an object of this type and set all field values.
      Parameters:
      originatingIdentity - identity of the user that initiated the request from the platform
    • getRequestIdentity

      public String getRequestIdentity()
      Get the identify of the request that was sent from the platform.

      This value is set from the X-Broker-API-Request-Identity header in the request from the platform

      Returns:
      the request identity, or null if not provided
    • setRequestIdentity

      public void setRequestIdentity(String requestIdentity)
      For internal use only; use a builder to construct an object of this type and set all field values.
      Parameters:
      requestIdentity - identify of the request sent from the platform
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      public boolean canEqual(Object other)
      Is another object type compatible with this object.
      Parameters:
      other - the other object
      Returns:
      true of compatible
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object