public abstract class ParentClient
extends java.lang.Object
| Constructor and Description |
|---|
ParentClient() |
| Modifier and Type | Method and Description |
|---|---|
es.ree.eemws.core.utils.iec61968100.MessageMetaData |
getMessageMetaData()
Gets message's metadata.
|
protected ch.iec.tc57._2011.schema.message.ResponseMessage |
sendMessage(ch.iec.tc57._2011.schema.message.RequestMessage message)
Sends the given request message to the configured URL.
|
void |
setCertificate(java.security.cert.X509Certificate inCertificate)
Sets the certificate to sign the request.
|
void |
setEndPoint(java.lang.String url)
Sets the URL of the end point of the web service.
|
void |
setEndPoint(java.net.URL url)
Sets the URL of the end point of the web service.
|
void |
setPrivateKey(java.security.PrivateKey inPrivateKey)
Sets the private key to sign the request.
|
void |
setSignRequest(boolean flag)
Sets whether the request has to be signed.
|
void |
setVerifyResponse(boolean flag)
Sets whether the response's signature has to be validated.
|
protected void |
validateResponse(ch.iec.tc57._2011.schema.message.ResponseMessage responseMessage,
boolean canBeEmpty)
Validates the received response.
|
protected void |
validateResponse(ch.iec.tc57._2011.schema.message.ResponseMessage responseMessage,
java.lang.String expectedNoun)
Validates the received response.
|
public final void setEndPoint(java.lang.String url)
throws java.net.MalformedURLException
url - URL of the end point of the web service.java.net.MalformedURLException - if the given address is not valid.public final void setEndPoint(java.net.URL url)
url - URL of the end point of the web service.public final void setSignRequest(boolean flag)
flag - true if request has to be signed.public final void setVerifyResponse(boolean flag)
flag - true if the response's signature has to be validated.public final void setCertificate(java.security.cert.X509Certificate inCertificate)
inCertificate - Certificate to sign request.public final void setPrivateKey(java.security.PrivateKey inPrivateKey)
inPrivateKey - Private key to sign the request.public final es.ree.eemws.core.utils.iec61968100.MessageMetaData getMessageMetaData()
protected final ch.iec.tc57._2011.schema.message.ResponseMessage sendMessage(ch.iec.tc57._2011.schema.message.RequestMessage message)
throws es.ree.eemws.core.utils.operations.HandlerException
message - Message to send.es.ree.eemws.core.utils.operations.HandlerException - If it is not possible to send the message or if the received response has errors.protected void validateResponse(ch.iec.tc57._2011.schema.message.ResponseMessage responseMessage,
java.lang.String expectedNoun)
throws es.ree.eemws.core.utils.operations.HandlerException
responseMessage - Received response.expectedNoun - Expected noun, according to the operation.es.ree.eemws.core.utils.operations.HandlerException - If the response is not valid.protected void validateResponse(ch.iec.tc57._2011.schema.message.ResponseMessage responseMessage,
boolean canBeEmpty)
throws es.ree.eemws.core.utils.operations.HandlerException
responseMessage - Received response.canBeEmpty - true if the response can be empty.es.ree.eemws.core.utils.operations.HandlerException - If the response is not valid.