BaseSmResp
public abstract class BaseSmResp
Extends: PduResponse
BaseSmResp is an abstract base class for all SMPP response PDUs that return a message_id, such as SubmitSmResp, SubmitMultiResp, and DataSmResp. It provides the common functionality for managing the returned message identifier and handles the body serialization logic shared across these responses.
Fields (Inherited from Pdu)
PDU_HEADER_LENGTH, PDU_INT_LENGTH
Constructor:
public BaseSmResp(CommandType commandId, String name)
commandId: SMPP response command type (e.g., SUBMIT_SM_RESP).
name: Human-readable identifier for the command.
Initializes a base message response with the given command ID and descriptive name.
Methods:
String getMessageId() | Returns the message ID generated by the SMSC. |
void setMessageId(String value) | Sets the message ID to be included in the response. |
void readBody(ByteBuf buffer) | Deserializes the response body from the buffer. |
void writeBody(ByteBuf buffer) | Serializes the response body to the buffer. |
int calculateByteSizeOfBody() | Returns the size of the body in bytes. |
void appendBodyToString(StringBuilder buffer) | Appends body data as a readable string (used for debugging/logging). |
Methods inherited from class com.mobius.software.protocols.smpp.PduResponse |
|
getResultMessage, setResultMessage | |
Methods inherited from class com.mobius.software.protocols.smpp.Pdu |
|
addOptionalParameter, calculateAndSetCommandLength, getCommandId, getCommandLength, getCommandStatus, getName, getOptionalParameter, getOptionalParameterCount, getOptionalParameters, getReferenceObject, getSequenceNumber, hasCommandLengthCalculated, hasOptionalParameter, hasSequenceNumberAssigned, isRequest, isResponse, readOptionalParameters, removeCommandLength, removeOptionalParameter, removeSequenceNumber, setCommandLength, setCommandStatus, setOptionalParameter, setReferenceObject, setSequenceNumber, toString, writeOptionalParameters | |
Methods inherited from class java.lang.Object |
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Start innovating with Mobius
What's next? Let's talk!