Package net.dona.doip.server
Class DoipServerRequestImpl
- java.lang.Object
-
- net.dona.doip.server.DoipServerRequestImpl
-
- All Implemented Interfaces:
DoipServerRequest
public class DoipServerRequestImpl extends java.lang.Object implements DoipServerRequest
An implementation ofDoipServerRequestused internally byDoipServer.
-
-
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.JsonElementgetAttribute(java.lang.String key)Returns a single attribute from the attributes given by the initial segment of the request.java.lang.StringgetAttributeAsString(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.JsonObjectgetAttributes()Returns the attributes given by the initial segment of the request.com.google.gson.JsonElementgetAuthentication()Returns the authentication information given by the initial segment of the request.java.lang.StringgetClientId()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.StringgetConnectionClientId()If the client is using a TLS client-side certificate, this returns the client id from the certificate.java.security.PublicKeygetConnectionPublicKey()If the client is using a TLS client-side certificate, this returns the public key from the certificate.InDoipMessagegetInput()Returns the input of the request.java.lang.StringgetOperationId()Returns the operation id (the operation to perform) given by the initial segment of the request.java.lang.StringgetRequestId()java.lang.StringgetTargetId()Returns the target id (the object on which to perform the operation) given by the initial segment of the request.
-
-
-
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:DoipServerRequestReturns the client id given by the initial segment of the request.- Specified by:
getClientIdin interfaceDoipServerRequest
-
getTargetId
public java.lang.String getTargetId()
Description copied from interface:DoipServerRequestReturns the target id (the object on which to perform the operation) given by the initial segment of the request.- Specified by:
getTargetIdin interfaceDoipServerRequest
-
getOperationId
public java.lang.String getOperationId()
Description copied from interface:DoipServerRequestReturns the operation id (the operation to perform) given by the initial segment of the request.- Specified by:
getOperationIdin interfaceDoipServerRequest
-
getAttributes
public com.google.gson.JsonObject getAttributes()
Description copied from interface:DoipServerRequestReturns the attributes given by the initial segment of the request.- Specified by:
getAttributesin interfaceDoipServerRequest
-
getAttribute
public com.google.gson.JsonElement getAttribute(java.lang.String key)
Description copied from interface:DoipServerRequestReturns a single attribute from the attributes given by the initial segment of the request.- Specified by:
getAttributein interfaceDoipServerRequest- Parameters:
key- the attribute to retrieve
-
getAttributeAsString
public java.lang.String getAttributeAsString(java.lang.String key)
Description copied from interface:DoipServerRequestReturns as a String a single attribute from the attributes given by the initial segment of the request.- Specified by:
getAttributeAsStringin interfaceDoipServerRequest- Parameters:
key- the attribute to retrieve
-
getAuthentication
public com.google.gson.JsonElement getAuthentication()
Description copied from interface:DoipServerRequestReturns the authentication information given by the initial segment of the request.- Specified by:
getAuthenticationin interfaceDoipServerRequest
-
getInput
public InDoipMessage 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
-
getConnectionClientId
public java.lang.String 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
-
getConnectionPublicKey
public java.security.PublicKey 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
-
getConnectionCertificateChain
public java.security.cert.X509Certificate[] 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
-
-