Class BaseRequest

java.lang.Object
com.rubensgomes.base.reqresp.BaseRequest

public class BaseRequest extends Object
Base Request Object

A base type that should be part of all microservice requests.

  • Constructor Details

    • BaseRequest

      public BaseRequest()
      No args constructor for use in serialization
    • BaseRequest

      public BaseRequest(String clientId, String transactionId, BaseRequest.ProfileType profileType)
      Parameters:
      clientId - The application client Id. Notice that this is not the ID of the consumer, but of actual client (e.g., webapp or mobileapp) that initiated the original request.
      profileType - The environment profile the request is running under. This provie helps to configure properties such as end point addresses that might be different depending on the profile.
      transactionId - A unique text usually created at the end point of the system (e.g., north bound API end point.) This transactionId serves to correlate all the requests/responses within the system to that transaction Id.
  • Method Details

    • builder

      public static BaseRequest.BaseRequestBuilderBase builder()
    • getClientId

      public String getClientId()
      The application client Id. Notice that this is not the ID of the consumer, but of actual client (e.g., webapp or mobileapp) that initiated the original request. (Required)
    • setClientId

      public void setClientId(String clientId)
      The application client Id. Notice that this is not the ID of the consumer, but of actual client (e.g., webapp or mobileapp) that initiated the original request. (Required)
    • getTransactionId

      public String getTransactionId()
      A unique text usually created at the end point of the system (e.g., north bound API end point.) This transactionId serves to correlate all the requests/responses within the system to that transaction Id. (Required)
    • setTransactionId

      public void setTransactionId(String transactionId)
      A unique text usually created at the end point of the system (e.g., north bound API end point.) This transactionId serves to correlate all the requests/responses within the system to that transaction Id. (Required)
    • getProfileType

      public BaseRequest.ProfileType getProfileType()
      The environment profile the request is running under. This provie helps to configure properties such as end point addresses that might be different depending on the profile. (Required)
    • setProfileType

      public void setProfileType(BaseRequest.ProfileType profileType)
      The environment profile the request is running under. This provie helps to configure properties such as end point addresses that might be different depending on the profile. (Required)
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • setAdditionalProperty

      public void setAdditionalProperty(String name, Object value)
    • toString

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

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

      public boolean equals(Object other)
      Overrides:
      equals in class Object