PduRequest
public abstract class PduRequest<R extends PduResponse>
extends Pdu, PduResponse
The base class for all request PDUs. It introduces support for generic response types and request-specific logic.
PduRequest is an abstract subclass of Pdu that represents all SMPP request PDUs. It defines the structure for sending commands to the SMSC and provides hooks for generating responses and handling errors. All SMPP command classes that initiate a communication (like SubmitSm, BindReceiver, QuerySm, etc.) extend this class.
Fields inherited from class com.mobius.software.protocols.smpp.Pdu
PDU_HEADER_LENGTH, PDU_INT_LENGTH
Constructor:
public PduRequest(CommandType commandId,
String name)
commandId: SMPP command identifier (e.g., SUBMIT_SM).
name: Human-readable name of the command.
Initializes a new request PDU with a command type and name. This constructor sets up the PDU as a request internally.
Methods:
public abstract R createResponse() | Creates the specific response object associated with this request. |
public abstract Class<R> getResponseClass() | Returns the class of the expected response type. |
public GenericNack createGenericNack(MessageStatus commandStatus) | Generates a generic NACK response for error scenarios. |
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, readBody, readOptionalParameters, removeCommandLength, removeOptionalParameter, removeSequenceNumber, setCommandLength, setCommandStatus, setOptionalParameter, setReferenceObject, setSequenceNumber, toString, writeBody, 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!