EmptyBodyResp
public abstract class EmptyBodyResp
Extends: PduResponse
EmptyBodyResp is an abstract base class for SMPP response PDUs that contain no body fields. It provides a shared implementation for commands like UnbindResp and EnquireLinkResp, where the response carries no payload but must still conform to SMPP's structure and encoding rules.
This class ensures correct serialization and deserialization of an "empty body" and allows subclasses to avoid repeating boilerplate code.
Fields inherited from class com.mobius.software.protocols.smpp.Pdu
PDU_HEADER_LENGTH, PDU_INT_LENGTH
Constructor:
public EmptyBodyResp(CommandType commandId, String name)
commandId – The SMPP response command identifier.
name – Descriptive name of the command (e.g. "unbind_resp").
Initializes a response with an empty body using the provided command type and name.
Methods:
void readBody(ByteBuf buffer) | Reads the body from the buffer (does nothing; body is empty). |
int calculateByteSizeOfBody() | Returns 0, since there is no body content. |
void writeBody(ByteBuf buffer) | Writes nothing to the buffer, as the body is empty. |
void appendBodyToString(StringBuilder buffer) | Appends an empty or placeholder string to a buffer for logging/debugging. |
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!