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.JsonElementgetAttribute(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.JsonObjectReturns the attributes given by the initial segment of this DOIP request.com.google.gson.JsonElementReturns 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:DoipServerRequestReturns the client ID given by the initial segment of this DOIP request.- Specified by:
getClientIdin interfaceDoipServerRequest- Returns:
- the client ID given by the initial segment of this DOIP request
-
getTargetId
Description copied from interface:DoipServerRequestReturns the target ID (the object on which to perform the operation) given by the initial segment of this DOIP request.- Specified by:
getTargetIdin interfaceDoipServerRequest- Returns:
- the target ID given by the initial segment of this DOIP request
-
getOperationId
Description copied from interface:DoipServerRequestReturns the operation ID (the operation to perform) given by the initial segment of this DOIP request.- Specified by:
getOperationIdin 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:DoipServerRequestReturns the attributes given by the initial segment of this DOIP request.- Specified by:
getAttributesin interfaceDoipServerRequest- Returns:
- the attributes given by the initial segment of this DOIP request
-
getAttribute
Description copied from interface:DoipServerRequestReturns a single attribute from the attributes given by the initial segment of the DOIP request.- Specified by:
getAttributein 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:DoipServerRequestReturns as a String a single attribute from the attributes given by the initial segment of this DOIP request.- Specified by:
getAttributeAsStringin 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:DoipServerRequestReturns the authentication information given by the initial segment of this DOIP request.- Specified by:
getAuthenticationin interfaceDoipServerRequest- Returns:
- the authentication information given by the initial segment of this DOIP request
-
getInput
Description copied from interface:DoipServerRequestReturns 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:
getInputin interfaceDoipServerRequest- Returns:
- the input of this DOIP request
-
getConnectionClientId
Description copied from interface:DoipServerRequestIf the client is using a TLS client-side certificate, this returns the client id from the certificate.- Specified by:
getConnectionClientIdin interfaceDoipServerRequest- Returns:
- the client ID from a TLS client-side certificate
-
getConnectionPublicKey
Description copied from interface:DoipServerRequestIf the client is using a TLS client-side certificate, this returns the public key from the certificate.- Specified by:
getConnectionPublicKeyin interfaceDoipServerRequest- Returns:
- the public key from a TLS client-side certificate
-
getConnectionCertificateChain
Description copied from interface:DoipServerRequestIf the client is using a TLS client-side certificate, this returns the supplied certificate chain.- Specified by:
getConnectionCertificateChainin interfaceDoipServerRequest- Returns:
- the supplied certificate chain from a a TLS client-side certificate
-