Version
ReplaceSm
Corresponding SMPP Command: query_sm
Extends: PduRequest<ReplaceSmResp>
ReplaceSm represents the SMPP replace_sm command. It allows an ESME to replace the short message content of a previously submitted message that has not yet been delivered. The message is identified by its message_id and source_address. This class wraps all necessary fields for that operation.
Fields (Inherited from Pdu)
PDU_HEADER_LENGTH, PDU_INT_LENGTH
Constructor:
public ReplaceSm()
Creates a new ReplaceSm instance. All relevant fields must be set before sending the request.
Methods:
ReplaceSmResp createResponse() | Returns a new ReplaceSmResp acknowledging the replacement. |
Class<ReplaceSmResp> getResponseClass() | Returns ReplaceSmResp.class as the expected response type. |
String getMessageId() | Gets the message ID of the original message. |
void setMessageId(String messageId) | Sets the message ID of the message to replace. |
byte[] getShortMessage() | Gets the new short message content. |
void setShortMessage(byte[] value) |
Sets the new short message content. Throws SmppInvalidArgumentException if invalid. |
int getShortMessageLength() | Returns the byte length of the short message. |
byte getDefaultMsgId() | Returns the ID of the default predefined message, if used. |
void setDefaultMsgId(byte value) | Sets the ID of a predefined message instead of short text. |
byte getRegisteredDelivery() | Returns the delivery receipt configuration. |
void setRegisteredDelivery(byte value) | Configures delivery receipt request settings. |
String getValidityPeriod() | Gets the validity period for the updated message. |
void setValidityPeriod(String value) | Sets the validity period. |
String getScheduleDeliveryTime() | Gets the time when message delivery should be attempted. |
void setScheduleDeliveryTime(String value) | Sets the scheduled delivery time. |
Address getSourceAddress() | Returns the source address of the original message. |
void setSourceAddress(Address value) | Sets the source address. |
void readBody(ByteBuf buffer) | Deserializes the request body from binary. |
void writeBody(ByteBuf buffer) | Serializes the request body into binary. |
int calculateByteSizeOfBody() | Calculates the full byte size of the PDU body. |
void appendBodyToString(StringBuilder buffer) | Appends a readable version of the body fields (for debugging/logging). |
Methods inherited from class com.mobius.software.protocols.smpp.PduRequest |
|
createGenericNack | |
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!