Class CSMessageResponseData
- java.lang.Object
-
- org.certificateservices.messages.csmessages.CSMessageResponseData
-
- Direct Known Subclasses:
PKIMessageResponseData
public class CSMessageResponseData extends java.lang.ObjectValue class containing the result of a message processing call.The information is mainly the response and PKI message destination.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringdestinationprotected booleanisForwardableResponseprotected java.lang.StringmessageIdprotected java.lang.StringmessageNameprotected java.util.Map<java.lang.String,java.lang.String>messagePropertiesprotected java.lang.StringrelatedEndEntityprotected byte[]responseDataprotected CSMessageresponseMessage
-
Constructor Summary
Constructors Constructor Description CSMessageResponseData()Empty constructorCSMessageResponseData(java.lang.String messageId, java.lang.String messageName, java.lang.String relatedEndEntity, java.lang.String destination, byte[] responseData)Alternative constructor when CSMessage is not available.CSMessageResponseData(java.lang.String messageId, java.lang.String messageName, java.lang.String relatedEndEntity, java.lang.String destination, byte[] responseData, boolean isForwardableResponse)Constructor where it's possible to set if the response is a failure response.CSMessageResponseData(CSMessage responseMessage, java.lang.String relatedEndEntity, byte[] responseData, boolean isForwardableResponse)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDestination()booleangetIsForwardableResponse()java.lang.StringgetMessageId()java.lang.StringgetMessageName()java.util.Map<java.lang.String,java.lang.String>getMessageProperties()Gets a map of extra properties related to a message, for specific purposes, for example JMS properties in a MQ environment.java.lang.StringgetRelatedEndEntity()byte[]getResponseData()CSMessagegetResponseMessage()booleanisForwardable(java.util.Set<java.lang.String> excludedDestinations)Help method calculating if a method should be forwarded or not.voidsetDestination(java.lang.String destination)voidsetIsForwardableResponse(boolean isForwardableResponse)voidsetMessageId(java.lang.String messageId)voidsetMessageName(java.lang.String messageName)voidsetRelatedEndEntity(java.lang.String relatedEndEntity)voidsetResponseData(byte[] responseData)voidsetResponseMessage(CSMessage responseMessage)java.lang.StringtoString()
-
-
-
Field Detail
-
messageId
protected java.lang.String messageId
-
messageName
protected java.lang.String messageName
-
relatedEndEntity
protected java.lang.String relatedEndEntity
-
destination
protected java.lang.String destination
-
responseData
protected byte[] responseData
-
isForwardableResponse
protected boolean isForwardableResponse
-
responseMessage
protected CSMessage responseMessage
-
messageProperties
protected java.util.Map<java.lang.String,java.lang.String> messageProperties
-
-
Constructor Detail
-
CSMessageResponseData
public CSMessageResponseData()
Empty constructor
-
CSMessageResponseData
public CSMessageResponseData(CSMessage responseMessage, java.lang.String relatedEndEntity, byte[] responseData, boolean isForwardableResponse)
Default constructor- Parameters:
responseMessage- The related response message.relatedEndEntity- the related end entity of the message.responseData- the response dataisForwardableResponse- true if response is forwardable.
-
CSMessageResponseData
public CSMessageResponseData(java.lang.String messageId, java.lang.String messageName, java.lang.String relatedEndEntity, java.lang.String destination, byte[] responseData)Alternative constructor when CSMessage is not available.- Parameters:
messageId- the related id of the messagemessageName- the name of the message in the responserelatedEndEntity- the related end entity of the message.destination- the PKI Message destination to send the message to.responseData- the response data
-
CSMessageResponseData
public CSMessageResponseData(java.lang.String messageId, java.lang.String messageName, java.lang.String relatedEndEntity, java.lang.String destination, byte[] responseData, boolean isForwardableResponse)Constructor where it's possible to set if the response is a failure response.- Parameters:
messageId- the related id of the messagemessageName- the name of the message in the responserelatedEndEntity- the related end entity of the message.destination- the PKI Message destination to send the message to.responseData- the response dataisForwardableResponse- true if response is forwardable.
-
-
Method Detail
-
isForwardable
public boolean isForwardable(java.util.Set<java.lang.String> excludedDestinations)
Help method calculating if a method should be forwarded or not.Does the following calculation:
- Is PKI Message Destination not in exclude list
- is not a failure response
- if both are true is true returned
- Parameters:
excludedDestinations- a set of excluded destinations.- Returns:
- true if this message should be forwarded
-
getDestination
public java.lang.String getDestination()
- Returns:
- the PKI Message destination to send the message to.
-
setDestination
public void setDestination(java.lang.String destination)
- Parameters:
destination- the PKI Message destination to send the message to.
-
getResponseData
public byte[] getResponseData()
- Returns:
- the response data
-
setResponseData
public void setResponseData(byte[] responseData)
- Parameters:
responseData- the response data
-
getIsForwardableResponse
public boolean getIsForwardableResponse()
- Returns:
- true if response is a forwardable or not.
-
setIsForwardableResponse
public void setIsForwardableResponse(boolean isForwardableResponse)
- Parameters:
isForwardableResponse- true if response is a failure indication.
-
getMessageId
public java.lang.String getMessageId()
- Returns:
- the related id of the message
-
setMessageId
public void setMessageId(java.lang.String messageId)
- Parameters:
messageId- the related id of the message
-
getRelatedEndEntity
public java.lang.String getRelatedEndEntity()
- Returns:
- the related end entity of the message.
-
setRelatedEndEntity
public void setRelatedEndEntity(java.lang.String relatedEndEntity)
- Parameters:
relatedEndEntity- the related end entity of the message.
-
getMessageName
public java.lang.String getMessageName()
- Returns:
- the name of the message in the response
-
setMessageName
public void setMessageName(java.lang.String messageName)
- Parameters:
messageName- the name of the message in the response
-
getResponseMessage
public CSMessage getResponseMessage()
- Returns:
- responseMessage The related response message.
-
setResponseMessage
public void setResponseMessage(CSMessage responseMessage)
- Parameters:
responseMessage- The related response message.
-
getMessageProperties
public java.util.Map<java.lang.String,java.lang.String> getMessageProperties()
Gets a map of extra properties related to a message, for specific purposes, for example JMS properties in a MQ environment.- Returns:
- a map of properties, never null.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-