Interface IServerServicesInterceptorHelper


  • Method Details

    • getUsername

      Get username from the request
      Parameters:
      request - the request to pass along the chain.
      response - the response to pass along the chain.
      Returns:
      Username if available
    • getUserRole

      Get list of roles of the current user from the request
      Parameters:
      request - the request to pass along the chain.
      response - the response to pass along the chain.
      Returns:
      User role if available
    • getServiceType

      Get service type from the request
      Parameters:
      request - the request to pass along the chain.
      response - the response to pass along the chain.
      Returns:
      Service type if available
    • getServiceName

      Get service name from the request
      Parameters:
      request - the request to pass along the chain.
      response - the response to pass along the chain.
      Returns:
      Service name
    • getOperationName

      Get service operation from the request
      Parameters:
      request - the request to pass along the chain.
      response - the response to pass along the chain.
      Returns:
      Operation name if available
    • isRestRequest

      Check if the request is a REST request or not
      Parameters:
      request - the request to pass along the chain.
      interceptorChain - the chain object to pass the request along the chain.
      Returns:
      Flag indicating if REST request or not
    • getDecompressedResponseData

      String getDecompressedResponseData(byte[] compressedResponse) throws IOException
      Decompresses the response data which is in the GZIP file format and returns the uncompressed response body in String format
      Parameters:
      compressedResponse - compressed byte array representing the response data
      Returns:
      Return the decompressed response string
      Throws:
      IOException
    • getCompressedResponseData

      byte[] getCompressedResponseData(String uncompressedData) throws IOException
      Compresses the String response body and returns a byte array compressed in the GZIP file format
      Parameters:
      uncompressedData - uncompressed response string
      Returns:
      Return the compressed response byte array
      Throws:
      IOException
    • isOutputStreamCompressed

      Returns whether the response data is in compressed format or not
      Parameters:
      request - the request to pass along the chain.
      response - the response to pass along the chain.
      Returns:
      Boolean indicating whether response is compressed or not