Class JobRequestMetadata

  • All Implemented Interfaces:
    java.io.Serializable

    public class JobRequestMetadata
    extends java.lang.Object
    implements java.io.Serializable
    Metadata gathered by the system as part of any JobRequest.
    Since:
    4.0.0
    See Also:
    Serialized Form
    • Constructor Detail

      • JobRequestMetadata

        public JobRequestMetadata​(@Nullable
                                  ApiClientMetadata apiClientMetadata,
                                  @Nullable
                                  AgentClientMetadata agentClientMetadata,
                                  int numAttachments,
                                  long totalSizeOfAttachments,
                                  @Nullable
                                  java.util.Map<java.lang.String,​java.lang.String> requestHeaders)
                           throws java.lang.IllegalArgumentException
        Constructor. One of apiClientMetadata or agentClientMetadata is required. Both cannot be present.
        Parameters:
        apiClientMetadata - The metadata about the client if this request was received via API
        agentClientMetadata - The metadata about the client if this request was received from the Agent
        numAttachments - The number of attachments that came with this job request
        totalSizeOfAttachments - The total size of the attachments that came with this job request
        requestHeaders - The map of HTTP headers (filtered upstream) if this request was received via API
        Throws:
        java.lang.IllegalArgumentException - If both apiClientMetadata and agentClientMetadata are missing or both are present
    • Method Detail

      • getApiClientMetadata

        public java.util.Optional<ApiClientMetadata> getApiClientMetadata()
        If the job request was sent via API this field will be populated.
        Returns:
        The API client metadata wrapped in an Optional
      • getAgentClientMetadata

        public java.util.Optional<AgentClientMetadata> getAgentClientMetadata()
        If the job request was sent via the Agent this field will be populated.
        Returns:
        The Agent client metadata wrapped in an Optional