Class ServiceContext

All Implemented Interfaces:
SecurityContext
Direct Known Subclasses:
SNSContext

public class ServiceContext extends HTTPContext
An invocation/security context object for Web Services.
Since:
1.0
Version:
8.3
Author:
Luke
  • Constructor Details

  • Method Details

    • getBody

      public String getBody()
      Retrieves the POST body.
      Returns:
      the body
    • print

      public void print(String data)
      Prints a string to the output buffer.
      Parameters:
      data - the string to print
      See Also:
    • println

      public void println(String data)
      Prints a string and a trailing newline to the output buffer.
      Parameters:
      data - the string to print
      See Also:
    • commit

      public void commit() throws IOException
      Writes the output buffer to the HTTP servlet response, setting the Content-length header.
      Throws:
      IOException - if an I/O error occurs
      See Also:
    • setContentType

      public void setContentType(String contentType, String encoding)
      Helper method to set the content type and output encoding.
      Parameters:
      contentType - the content type
      encoding - the encoding
    • setContentType

      public void setContentType(String contentType)
      Helper method to set the content type.
      Parameters:
      contentType - the content type