EmptyBody
public abstract class EmptyBody<R extends PduResponse>
Extends: PduRequest<R>
EmptyBody is an abstract base class for SMPP request PDUs that contain no body fields. It provides default implementations of serialization, deserialization, and byte-size calculation for commands that are structurally empty but still require a valid PDU format. This class is used by PDUs like Unbind and EnquireLink, where the header and optional parameters are present but the body is unused.
Fields inherited from class com.mobius.software.protocols.smpp.Pdu
PDU_HEADER_LENGTH, PDU_INT_LENGTH
Constructor:
public EmptyBody(CommandType commandId, String name)
commandId – The SMPP command type (e.g., UNBIND, ENQUIRE_LINK).
name – Human-readable name of the command.
Initializes an empty-body request with a specific command identifier and name.
Methods:
void readBody(ByteBuf buffer) | Reads the body content from the buffer. No actual body content is expected. |
int calculateByteSizeOfBody() | Returns the size of the body (always 0). |
void writeBody(ByteBuf buffer) | Writes the body content (empty). |
void appendBodyToString(StringBuilder buffer) | Appends a representation of the body (usually empty) to a string builder. |
Methods inherited from class com.mobius.software.protocols.smpp.PduRequest |
|
createGenericNack, createResponse, getResponseClass | |
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!