Class KSBHttpInvokerRequestExecutor

java.lang.Object
org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor
org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor
org.kuali.rice.ksb.messaging.KSBHttpInvokerRequestExecutor
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.remoting.httpinvoker.HttpInvokerRequestExecutor
Direct Known Subclasses:
AuthenticationCommonsHttpInvokerRequestExecutor

public class KSBHttpInvokerRequestExecutor extends org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor
At HttpInvokerRequestExecutor which is capable of digitally signing and verifying messages. It's capabilities to execute the signing and verification can be turned on or off via an application constant.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Field Summary

    Fields inherited from class org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor

    CONTENT_TYPE_SERIALIZED_OBJECT, ENCODING_GZIP, HTTP_HEADER_ACCEPT_ENCODING, HTTP_HEADER_ACCEPT_LANGUAGE, HTTP_HEADER_CONTENT_ENCODING, HTTP_HEADER_CONTENT_LENGTH, HTTP_HEADER_CONTENT_TYPE, HTTP_METHOD_POST, logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
    KSBHttpInvokerRequestExecutor(org.apache.http.client.HttpClient httpClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    protected InputStream
    getResponseBody(org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration config, org.apache.http.HttpResponse postMethod)
    Returns a wrapped InputStream which is responsible for verifying the digital signature on the response after all data has been read.
     
    protected boolean
     
    protected void
    setRequestBody(org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration config, org.apache.http.client.methods.HttpPost httpPost, ByteArrayOutputStream baos)
    Signs the outgoing request by generating a digital signature from the bytes in the ByteArrayOutputStream and attaching the signature and our alias to the headers of the PostMethod.
    void
     
    protected void
    signRequest(org.apache.http.client.methods.HttpPost postMethod, ByteArrayOutputStream baos)
    Signs the request by adding headers to the PostMethod.
    protected void
    validateResponse(org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration config, org.apache.http.HttpResponse response)
     

    Methods inherited from class org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor

    createHttpPost, createRequestConfig, doExecuteRequest, executeHttpPost, getHttpClient, isGzipResponse, setConnectionRequestTimeout, setConnectTimeout, setHttpClient, setReadTimeout

    Methods inherited from class org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor

    createObjectInputStream, decorateInputStream, decorateOutputStream, doReadRemoteInvocationResult, doWriteRemoteInvocation, executeRequest, getBeanClassLoader, getByteArrayOutputStream, getContentType, isAcceptGzipEncoding, readRemoteInvocationResult, setAcceptGzipEncoding, setBeanClassLoader, setContentType, writeRemoteInvocation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KSBHttpInvokerRequestExecutor

      public KSBHttpInvokerRequestExecutor()
    • KSBHttpInvokerRequestExecutor

      public KSBHttpInvokerRequestExecutor(Boolean secure)
    • KSBHttpInvokerRequestExecutor

      public KSBHttpInvokerRequestExecutor(org.apache.http.client.HttpClient httpClient)
  • Method Details

    • setRequestBody

      protected void setRequestBody(org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration config, org.apache.http.client.methods.HttpPost httpPost, ByteArrayOutputStream baos) throws IOException
      Signs the outgoing request by generating a digital signature from the bytes in the ByteArrayOutputStream and attaching the signature and our alias to the headers of the PostMethod.
      Overrides:
      setRequestBody in class org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor
      Throws:
      IOException
    • getResponseBody

      protected InputStream getResponseBody(org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration config, org.apache.http.HttpResponse postMethod) throws IOException
      Returns a wrapped InputStream which is responsible for verifying the digital signature on the response after all data has been read.
      Overrides:
      getResponseBody in class org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor
      Throws:
      IOException
    • validateResponse

      protected void validateResponse(org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration config, org.apache.http.HttpResponse response) throws HttpException
      Overrides:
      validateResponse in class org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor
      Throws:
      HttpException
    • signRequest

      protected void signRequest(org.apache.http.client.methods.HttpPost postMethod, ByteArrayOutputStream baos) throws Exception
      Signs the request by adding headers to the PostMethod.
      Throws:
      Exception
    • isSecure

      protected boolean isSecure()
    • getSecure

      public Boolean getSecure()
    • setSecure

      public void setSecure(Boolean secure)
    • getDigitalSignatureService

      protected DigitalSignatureService getDigitalSignatureService()
    • getJavaSecurityManagementService

      protected JavaSecurityManagementService getJavaSecurityManagementService()