public class ErrorTCPMsg extends TCPMessage
| Modifier and Type | Class and Description |
|---|---|
static class |
ErrorTCPMsg.Code
Error types consisting of a major category code and a minor error type code.
|
TCPMessage.Flag, TCPMessage.Type, TCPMessage.Version| Constructor and Description |
|---|
ErrorTCPMsg(ErrorTCPMsg.Code errorType)
Create a new
ErrorTCPMsg with the given error type and the default version CMP2000. |
ErrorTCPMsg(java.io.InputStream is) |
ErrorTCPMsg(int pollRef)
Create a new
INVALID_POLL_ID ErrorTCPMsg with the given polling reference number and the default version CMP2000. |
ErrorTCPMsg(TCPMessage.Type msgType)
Create a new
INVALID_MESSAGE_TYPE ErrorTCPMsg with the given message type and the default version CMP2000. |
ErrorTCPMsg(TCPMessage.Version version, ErrorTCPMsg.Code errorType)
Create a new
ErrorTCPMsg with the given version and error type. |
ErrorTCPMsg(TCPMessage.Version version, int pollRef)
Create a new
INVALID_POLL_ID ErrorTCPMsg with the given version and polling reference number. |
ErrorTCPMsg(TCPMessage.Version version, TCPMessage.Type msgType)
Create a new
INVALID_MESSAGE_TYPE ErrorTCPMsg with the given version and message type. |
| Modifier and Type | Method and Description |
|---|---|
ErrorTCPMsg.Code |
getCode()
Returns the error code for this
ErrorTCPMsg. |
byte[] |
getData()
Returns the bytes of this
ErrorTCPMsg's data. |
java.lang.String |
getText()
Returns a user-readable error message.
|
TCPMessage.Type |
getType()
Get the TCP-based message type.
|
void |
setText(java.lang.String text)
Sets a user-readable error message.
|
java.lang.String |
toString() |
getVersion, hasFlag, input, inputInstance, length, output, setFlagpublic ErrorTCPMsg(TCPMessage.Version version, ErrorTCPMsg.Code errorType)
ErrorTCPMsg with the given version and error type. Use this constructor only for VERSION_NOT_SUPPORTED, GENERAL_CLIENT_ERROR or GENERAL_SERVER_ERROR.version - the PKI TCP transport protocol version.errorType - the error type.public ErrorTCPMsg(ErrorTCPMsg.Code errorType)
ErrorTCPMsg with the given error type and the default version CMP2000. Use this constructor only for VERSION_NOT_SUPPORTED, GENERAL_CLIENT_ERROR or GENERAL_SERVER_ERROR.errorType - the error type.public ErrorTCPMsg(TCPMessage.Version version, TCPMessage.Type msgType)
INVALID_MESSAGE_TYPE ErrorTCPMsg with the given version and message type.version - the PKI TCP transport protocol version.msgType - for an INVALID_MESSAGE_TYPE error, the invalid message type in question.TCPMessage.getType()public ErrorTCPMsg(TCPMessage.Type msgType)
INVALID_MESSAGE_TYPE ErrorTCPMsg with the given message type and the default version CMP2000.msgType - for an INVALID_MESSAGE_TYPE error, the invalid message type in question.TCPMessage.getType()public ErrorTCPMsg(TCPMessage.Version version, int pollRef)
INVALID_POLL_ID ErrorTCPMsg with the given version and polling reference number.version - the PKI TCP transport protocol version.pollRef - for an INVALID_POLL_ID error, the polling reference in question.PollRequestTCPMsg.getPollRef()public ErrorTCPMsg(int pollRef)
INVALID_POLL_ID ErrorTCPMsg with the given polling reference number and the default version CMP2000.pollRef - for an INVALID_POLL_ID error, the polling reference in question.PollRequestTCPMsg.getPollRef()
public ErrorTCPMsg(java.io.InputStream is)
throws java.io.IOException
java.io.IOExceptionpublic TCPMessage.Type getType()
TCPMessagegetType in class TCPMessagepublic ErrorTCPMsg.Code getCode()
ErrorTCPMsg.public byte[] getData()
ErrorTCPMsg's data. For example, in the case of a VERSION_NOT_SUPPORTED error, this would be the highest version number supported.public void setText(java.lang.String text)
public java.lang.String getText()
public java.lang.String toString()
toString in class java.lang.Object