Package net.dona.doip.server
Class DoipServerRequestImpl
java.lang.Object
net.dona.doip.server.DoipServerRequestImpl
- All Implemented Interfaces:
DoipServerRequest
An implementation of
DoipServerRequest
used internally by DoipServer
.-
Constructor Summary
ConstructorsConstructorDescriptionDoipServerRequestImpl
(InDoipMessage inDoipMessage, String clientCertId, PublicKey clientCertPublicKey, X509Certificate[] clientCertChain) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonElement
getAttribute
(String key) Returns a single attribute from the attributes given by the initial segment of the DOIP request.Returns as a String a single attribute from the attributes given by the initial segment of this DOIP request.com.google.gson.JsonObject
Returns the attributes given by the initial segment of this DOIP request.com.google.gson.JsonElement
Returns the authentication information given by the initial segment of this DOIP request.Returns the client ID given by the initial segment of this DOIP request.If the client is using a TLS client-side certificate, this returns the supplied certificate chain.If the client is using a TLS client-side certificate, this returns the client id from the certificate.If the client is using a TLS client-side certificate, this returns the public key from the certificate.getInput()
Returns the input of the request.Returns the operation ID (the operation to perform) given by the initial segment of this DOIP request.Returns the target ID (the object on which to perform the operation) given by the initial segment of this DOIP request.
-
Constructor Details
-
DoipServerRequestImpl
public DoipServerRequestImpl(InDoipMessage inDoipMessage, String clientCertId, PublicKey clientCertPublicKey, X509Certificate[] clientCertChain) throws IOException - Throws:
IOException
-
-
Method Details
-
getRequestId
-
getClientId
Description copied from interface:DoipServerRequest
Returns the client ID given by the initial segment of this DOIP request.- Specified by:
getClientId
in interfaceDoipServerRequest
- Returns:
- the client ID given by the initial segment of this DOIP request
-
getTargetId
Description copied from interface:DoipServerRequest
Returns the target ID (the object on which to perform the operation) given by the initial segment of this DOIP request.- Specified by:
getTargetId
in interfaceDoipServerRequest
- Returns:
- the target ID given by the initial segment of this DOIP request
-
getOperationId
Description copied from interface:DoipServerRequest
Returns the operation ID (the operation to perform) given by the initial segment of this DOIP request.- Specified by:
getOperationId
in interfaceDoipServerRequest
- Returns:
- the operation ID given by the initial segment of this DOIP request
-
getAttributes
public com.google.gson.JsonObject getAttributes()Description copied from interface:DoipServerRequest
Returns the attributes given by the initial segment of this DOIP request.- Specified by:
getAttributes
in interfaceDoipServerRequest
- Returns:
- the attributes given by the initial segment of this DOIP request
-
getAttribute
Description copied from interface:DoipServerRequest
Returns a single attribute from the attributes given by the initial segment of the DOIP request.- Specified by:
getAttribute
in interfaceDoipServerRequest
- Parameters:
key
- the attribute to retrieve- Returns:
- a single attribute from the attributes given by the initial segment of the DOIP request
-
getAttributeAsString
Description copied from interface:DoipServerRequest
Returns as a String a single attribute from the attributes given by the initial segment of this DOIP request.- Specified by:
getAttributeAsString
in interfaceDoipServerRequest
- Parameters:
key
- the attribute to retrieve- Returns:
- a single attribute as a string from the attributes given by the initial segment of this DOIP request
-
getAuthentication
public com.google.gson.JsonElement getAuthentication()Description copied from interface:DoipServerRequest
Returns the authentication information given by the initial segment of this DOIP request.- Specified by:
getAuthentication
in interfaceDoipServerRequest
- Returns:
- the authentication information given by the initial segment of this DOIP request
-
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 interfaceDoipServerRequest
- Returns:
- the input of this DOIP request
-
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 interfaceDoipServerRequest
- Returns:
- the client ID from a TLS client-side certificate
-
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 interfaceDoipServerRequest
- Returns:
- the public key from a TLS client-side certificate
-
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 interfaceDoipServerRequest
- Returns:
- the supplied certificate chain from a a TLS client-side certificate
-