Class DoipServerRequestImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      DoipServerRequestImpl​(InDoipMessage inDoipMessage, java.lang.String clientCertId, java.security.PublicKey clientCertPublicKey, java.security.cert.X509Certificate[] clientCertChain)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gson.JsonElement getAttribute​(java.lang.String key)
      Returns a single attribute from the attributes given by the initial segment of the request.
      java.lang.String getAttributeAsString​(java.lang.String key)
      Returns as a String a single attribute from the attributes given by the initial segment of the request.
      com.google.gson.JsonObject getAttributes()
      Returns the attributes given by the initial segment of the request.
      com.google.gson.JsonElement getAuthentication()
      Returns the authentication information given by the initial segment of the request.
      java.lang.String getClientId()
      Returns the client id given by the initial segment of the request.
      java.security.cert.X509Certificate[] getConnectionCertificateChain()
      If the client is using a TLS client-side certificate, this returns the supplied certificate chain.
      java.lang.String getConnectionClientId()
      If the client is using a TLS client-side certificate, this returns the client id from the certificate.
      java.security.PublicKey getConnectionPublicKey()
      If the client is using a TLS client-side certificate, this returns the public key from the certificate.
      InDoipMessage getInput()
      Returns the input of the request.
      java.lang.String getOperationId()
      Returns the operation id (the operation to perform) given by the initial segment of the request.
      java.lang.String getRequestId()  
      java.lang.String getTargetId()
      Returns the target id (the object on which to perform the operation) given by the initial segment of the request.
      • Methods inherited from class java.lang.Object

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

      • DoipServerRequestImpl

        public DoipServerRequestImpl​(InDoipMessage inDoipMessage,
                                     java.lang.String clientCertId,
                                     java.security.PublicKey clientCertPublicKey,
                                     java.security.cert.X509Certificate[] clientCertChain)
                              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getRequestId

        public java.lang.String getRequestId()
      • getClientId

        public java.lang.String getClientId()
        Description copied from interface: DoipServerRequest
        Returns the client id given by the initial segment of the request.
        Specified by:
        getClientId in interface DoipServerRequest
      • getTargetId

        public java.lang.String getTargetId()
        Description copied from interface: DoipServerRequest
        Returns the target id (the object on which to perform the operation) given by the initial segment of the request.
        Specified by:
        getTargetId in interface DoipServerRequest
      • getOperationId

        public java.lang.String getOperationId()
        Description copied from interface: DoipServerRequest
        Returns the operation id (the operation to perform) given by the initial segment of the request.
        Specified by:
        getOperationId in interface DoipServerRequest
      • getAttributes

        public com.google.gson.JsonObject getAttributes()
        Description copied from interface: DoipServerRequest
        Returns the attributes given by the initial segment of the request.
        Specified by:
        getAttributes in interface DoipServerRequest
      • getAttribute

        public com.google.gson.JsonElement getAttribute​(java.lang.String key)
        Description copied from interface: DoipServerRequest
        Returns a single attribute from the attributes given by the initial segment of the request.
        Specified by:
        getAttribute in interface DoipServerRequest
        Parameters:
        key - the attribute to retrieve
      • getAttributeAsString

        public java.lang.String getAttributeAsString​(java.lang.String key)
        Description copied from interface: DoipServerRequest
        Returns as a String a single attribute from the attributes given by the initial segment of the request.
        Specified by:
        getAttributeAsString in interface DoipServerRequest
        Parameters:
        key - the attribute to retrieve
      • getAuthentication

        public com.google.gson.JsonElement getAuthentication()
        Description copied from interface: DoipServerRequest
        Returns the authentication information given by the initial segment of the request.
        Specified by:
        getAuthentication in interface DoipServerRequest
      • getInput

        public InDoipMessage getInput()
        Description copied from interface: DoipServerRequest
        Returns the input of the request. In the case of a "compact" single-segment request, this will be a single JSON segment corresponding to the "input" property of the single-segment request. Otherwise it will be all remaining segments of the request after the initial segment.
        Specified by:
        getInput in interface DoipServerRequest
      • getConnectionClientId

        public java.lang.String getConnectionClientId()
        Description copied from interface: DoipServerRequest
        If the client is using a TLS client-side certificate, this returns the client id from the certificate.
        Specified by:
        getConnectionClientId in interface DoipServerRequest
      • getConnectionPublicKey

        public java.security.PublicKey getConnectionPublicKey()
        Description copied from interface: DoipServerRequest
        If the client is using a TLS client-side certificate, this returns the public key from the certificate.
        Specified by:
        getConnectionPublicKey in interface DoipServerRequest
      • getConnectionCertificateChain

        public java.security.cert.X509Certificate[] getConnectionCertificateChain()
        Description copied from interface: DoipServerRequest
        If the client is using a TLS client-side certificate, this returns the supplied certificate chain.
        Specified by:
        getConnectionCertificateChain in interface DoipServerRequest