From 3c4a52e1a37b28e10c7a055be5d45a6aa78d9c64 Mon Sep 17 00:00:00 2001 From: juhana Date: Mon, 28 Mar 2016 10:39:36 +0300 Subject: [PATCH] Add serialization support with keeping backwards compatibility at the same time. --- .../java/com/cloudhopper/smpp/pdu/AlertNotification.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/BaseBindResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/BaseSm.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/BaseSmResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/BindReceiver.java | 2 ++ .../java/com/cloudhopper/smpp/pdu/BindReceiverResp.java | 2 ++ .../java/com/cloudhopper/smpp/pdu/BindTransceiver.java | 2 ++ .../java/com/cloudhopper/smpp/pdu/BindTransceiverResp.java | 2 ++ .../java/com/cloudhopper/smpp/pdu/BindTransmitter.java | 2 ++ .../java/com/cloudhopper/smpp/pdu/BindTransmitterResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/CancelSm.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/CancelSmResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/DataSm.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/DataSmResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/DeliverSm.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/DeliverSmResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/EmptyBody.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/EmptyBodyResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/EnquireLink.java | 2 ++ .../java/com/cloudhopper/smpp/pdu/EnquireLinkResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/GenericNack.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/PartialPdu.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/PartialPduResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/Pdu.java | 7 ++++++- src/main/java/com/cloudhopper/smpp/pdu/PduRequest.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/PduResponse.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/QuerySm.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/QuerySmResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/ReplaceSm.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/ReplaceSmResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/SubmitSm.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/SubmitSmResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/Unbind.java | 2 ++ src/main/java/com/cloudhopper/smpp/pdu/UnbindResp.java | 2 ++ src/main/java/com/cloudhopper/smpp/tlv/Tlv.java | 6 +++++- src/main/java/com/cloudhopper/smpp/type/Address.java | 6 +++++- 37 files changed, 84 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/cloudhopper/smpp/pdu/AlertNotification.java b/src/main/java/com/cloudhopper/smpp/pdu/AlertNotification.java index aebfbea0..2544a518 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/AlertNotification.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/AlertNotification.java @@ -32,6 +32,8 @@ public class AlertNotification extends Pdu { + private static final long serialVersionUID = 1L; + protected Address sourceAddress; protected Address esmeAddress; diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java b/src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java index c814b4b7..1a9a78ed 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java @@ -37,6 +37,8 @@ */ public abstract class BaseBind extends PduRequest { + private static final long serialVersionUID = 1L; + private String systemId; private String password; private String systemType; diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BaseBindResp.java b/src/main/java/com/cloudhopper/smpp/pdu/BaseBindResp.java index bd2bb758..e49c14d8 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BaseBindResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BaseBindResp.java @@ -33,6 +33,8 @@ */ public abstract class BaseBindResp extends PduResponse { + private static final long serialVersionUID = 1L; + private String systemId; public BaseBindResp(int commandId, String name) { diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BaseSm.java b/src/main/java/com/cloudhopper/smpp/pdu/BaseSm.java index 614f1aea..88784394 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BaseSm.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BaseSm.java @@ -40,6 +40,8 @@ */ public abstract class BaseSm extends PduRequest { + private static final long serialVersionUID = 1L; + protected String serviceType; protected Address sourceAddress; protected Address destAddress; diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BaseSmResp.java b/src/main/java/com/cloudhopper/smpp/pdu/BaseSmResp.java index 87930d3a..6f6880c1 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BaseSmResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BaseSmResp.java @@ -33,6 +33,8 @@ */ public abstract class BaseSmResp extends PduResponse { + private static final long serialVersionUID = 1L; + private String messageId; public BaseSmResp(int commandId, String name) { diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BindReceiver.java b/src/main/java/com/cloudhopper/smpp/pdu/BindReceiver.java index 87196686..014b8e6a 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BindReceiver.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BindReceiver.java @@ -28,6 +28,8 @@ */ public class BindReceiver extends BaseBind { + private static final long serialVersionUID = 1L; + public BindReceiver() { super(SmppConstants.CMD_ID_BIND_RECEIVER, "bind_receiver"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BindReceiverResp.java b/src/main/java/com/cloudhopper/smpp/pdu/BindReceiverResp.java index 116a70aa..dc40bc2f 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BindReceiverResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BindReceiverResp.java @@ -28,6 +28,8 @@ */ public class BindReceiverResp extends BaseBindResp { + private static final long serialVersionUID = 1L; + public BindReceiverResp() { super(SmppConstants.CMD_ID_BIND_RECEIVER_RESP, "bind_receiver_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BindTransceiver.java b/src/main/java/com/cloudhopper/smpp/pdu/BindTransceiver.java index d25fb77e..7c3fb85b 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BindTransceiver.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BindTransceiver.java @@ -28,6 +28,8 @@ */ public class BindTransceiver extends BaseBind { + private static final long serialVersionUID = 1L; + public BindTransceiver() { super(SmppConstants.CMD_ID_BIND_TRANSCEIVER, "bind_transceiver"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BindTransceiverResp.java b/src/main/java/com/cloudhopper/smpp/pdu/BindTransceiverResp.java index f30d72f7..ba30f86a 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BindTransceiverResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BindTransceiverResp.java @@ -28,6 +28,8 @@ */ public class BindTransceiverResp extends BaseBindResp { + private static final long serialVersionUID = 1L; + public BindTransceiverResp() { super(SmppConstants.CMD_ID_BIND_TRANSCEIVER_RESP, "bind_transceiver_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BindTransmitter.java b/src/main/java/com/cloudhopper/smpp/pdu/BindTransmitter.java index 75dcfa6d..86e5d095 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BindTransmitter.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BindTransmitter.java @@ -24,6 +24,8 @@ public class BindTransmitter extends BaseBind { + private static final long serialVersionUID = 1L; + public BindTransmitter() { super(SmppConstants.CMD_ID_BIND_TRANSMITTER, "bind_transmitter"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BindTransmitterResp.java b/src/main/java/com/cloudhopper/smpp/pdu/BindTransmitterResp.java index e97714b5..5a4db4e0 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BindTransmitterResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BindTransmitterResp.java @@ -24,6 +24,8 @@ public class BindTransmitterResp extends BaseBindResp { + private static final long serialVersionUID = 1L; + public BindTransmitterResp() { super(SmppConstants.CMD_ID_BIND_TRANSMITTER_RESP, "bind_transmitter_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/CancelSm.java b/src/main/java/com/cloudhopper/smpp/pdu/CancelSm.java index 231e2374..40425dac 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/CancelSm.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/CancelSm.java @@ -36,6 +36,8 @@ */ public class CancelSm extends PduRequest { + private static final long serialVersionUID = 1L; + protected String serviceType; protected String messageId; protected Address sourceAddress; diff --git a/src/main/java/com/cloudhopper/smpp/pdu/CancelSmResp.java b/src/main/java/com/cloudhopper/smpp/pdu/CancelSmResp.java index 6131393b..3c871bc0 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/CancelSmResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/CancelSmResp.java @@ -32,6 +32,8 @@ */ public class CancelSmResp extends PduResponse { + private static final long serialVersionUID = 1L; + public CancelSmResp() { super(SmppConstants.CMD_ID_CANCEL_SM_RESP, "cancel_sm_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/DataSm.java b/src/main/java/com/cloudhopper/smpp/pdu/DataSm.java index 8e15971d..4e282810 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/DataSm.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/DataSm.java @@ -29,6 +29,8 @@ public class DataSm extends BaseSm { + private static final long serialVersionUID = 1L; + public DataSm() { super(SmppConstants.CMD_ID_DATA_SM, "data_sm"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/DataSmResp.java b/src/main/java/com/cloudhopper/smpp/pdu/DataSmResp.java index f10a627a..7620acb9 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/DataSmResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/DataSmResp.java @@ -24,6 +24,8 @@ public class DataSmResp extends BaseSmResp { + private static final long serialVersionUID = 1L; + public DataSmResp() { super(SmppConstants.CMD_ID_DATA_SM_RESP, "data_sm_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/DeliverSm.java b/src/main/java/com/cloudhopper/smpp/pdu/DeliverSm.java index 39be2f0e..65c5cff4 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/DeliverSm.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/DeliverSm.java @@ -24,6 +24,8 @@ public class DeliverSm extends BaseSm { + private static final long serialVersionUID = 1L; + public DeliverSm() { super(SmppConstants.CMD_ID_DELIVER_SM, "deliver_sm"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/DeliverSmResp.java b/src/main/java/com/cloudhopper/smpp/pdu/DeliverSmResp.java index 77e8e961..f2237fdd 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/DeliverSmResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/DeliverSmResp.java @@ -24,6 +24,8 @@ public class DeliverSmResp extends BaseSmResp { + private static final long serialVersionUID = 1L; + public DeliverSmResp() { super(SmppConstants.CMD_ID_DELIVER_SM_RESP, "deliver_sm_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/EmptyBody.java b/src/main/java/com/cloudhopper/smpp/pdu/EmptyBody.java index 817f73f2..fdbbb9d5 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/EmptyBody.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/EmptyBody.java @@ -26,6 +26,8 @@ public abstract class EmptyBody extends PduRequest { + private static final long serialVersionUID = 1L; + public EmptyBody(int commandId, String name) { super(commandId, name); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/EmptyBodyResp.java b/src/main/java/com/cloudhopper/smpp/pdu/EmptyBodyResp.java index 4253bcb1..8d402700 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/EmptyBodyResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/EmptyBodyResp.java @@ -26,6 +26,8 @@ public abstract class EmptyBodyResp extends PduResponse { + private static final long serialVersionUID = 1L; + public EmptyBodyResp(int commandId, String name) { super(commandId, name); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/EnquireLink.java b/src/main/java/com/cloudhopper/smpp/pdu/EnquireLink.java index 87ea6223..fbf23edb 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/EnquireLink.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/EnquireLink.java @@ -24,6 +24,8 @@ public class EnquireLink extends EmptyBody { + private static final long serialVersionUID = 1L; + public EnquireLink() { super(SmppConstants.CMD_ID_ENQUIRE_LINK, "enquire_link"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/EnquireLinkResp.java b/src/main/java/com/cloudhopper/smpp/pdu/EnquireLinkResp.java index 31be47a1..a43a88ff 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/EnquireLinkResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/EnquireLinkResp.java @@ -24,6 +24,8 @@ public class EnquireLinkResp extends EmptyBodyResp { + private static final long serialVersionUID = 1L; + public EnquireLinkResp() { super(SmppConstants.CMD_ID_ENQUIRE_LINK_RESP, "enquire_link_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/GenericNack.java b/src/main/java/com/cloudhopper/smpp/pdu/GenericNack.java index e8d61fca..80d4cc1d 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/GenericNack.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/GenericNack.java @@ -27,6 +27,8 @@ public class GenericNack extends PduResponse { + private static final long serialVersionUID = 1L; + public GenericNack() { super(SmppConstants.CMD_ID_GENERIC_NACK, "generic_nack"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/PartialPdu.java b/src/main/java/com/cloudhopper/smpp/pdu/PartialPdu.java index 1498fb74..7c26333d 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/PartialPdu.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/PartialPdu.java @@ -22,6 +22,8 @@ public class PartialPdu extends EmptyBody { + private static final long serialVersionUID = 1L; + public PartialPdu(int commandId) { super(commandId, "partial_pdu"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/PartialPduResp.java b/src/main/java/com/cloudhopper/smpp/pdu/PartialPduResp.java index da4d0cc6..3d2a284e 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/PartialPduResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/PartialPduResp.java @@ -22,6 +22,8 @@ public class PartialPduResp extends EmptyBodyResp { + private static final long serialVersionUID = 1L; + public PartialPduResp(int commandId) { super(commandId, "partial_pdu_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/Pdu.java b/src/main/java/com/cloudhopper/smpp/pdu/Pdu.java index d7808070..9a20b76e 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/Pdu.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/Pdu.java @@ -27,10 +27,14 @@ import com.cloudhopper.smpp.tlv.Tlv; import com.cloudhopper.smpp.transcoder.PduTranscoderContext; import com.cloudhopper.smpp.util.ChannelBufferUtil; + +import java.io.Serializable; import java.util.ArrayList; import org.jboss.netty.buffer.ChannelBuffer; -public abstract class Pdu { +public abstract class Pdu implements Serializable { + + private static final long serialVersionUID = 1L; private final String name; private final boolean isRequest; @@ -52,6 +56,7 @@ public Pdu(int commandId, String name, boolean isRequest) { this.referenceObject = null; } + // value has to implement Serializable if serialization is used public void setReferenceObject(Object value) { this.referenceObject = value; } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/PduRequest.java b/src/main/java/com/cloudhopper/smpp/pdu/PduRequest.java index 507183c9..9255e05b 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/PduRequest.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/PduRequest.java @@ -22,6 +22,8 @@ public abstract class PduRequest extends Pdu { + private static final long serialVersionUID = 1L; + public PduRequest(int commandId, String name) { super(commandId, name, true); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/PduResponse.java b/src/main/java/com/cloudhopper/smpp/pdu/PduResponse.java index ce452acd..2411cffc 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/PduResponse.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/PduResponse.java @@ -22,6 +22,8 @@ public abstract class PduResponse extends Pdu { + private static final long serialVersionUID = 1L; + private String resultMessage; public PduResponse(int commandId, String name) { diff --git a/src/main/java/com/cloudhopper/smpp/pdu/QuerySm.java b/src/main/java/com/cloudhopper/smpp/pdu/QuerySm.java index 08623a41..fb3919a2 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/QuerySm.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/QuerySm.java @@ -36,6 +36,8 @@ */ public class QuerySm extends PduRequest { + private static final long serialVersionUID = 1L; + private String messageId; private Address sourceAddress; diff --git a/src/main/java/com/cloudhopper/smpp/pdu/QuerySmResp.java b/src/main/java/com/cloudhopper/smpp/pdu/QuerySmResp.java index e647162c..8a08961d 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/QuerySmResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/QuerySmResp.java @@ -36,6 +36,8 @@ */ public class QuerySmResp extends PduResponse { + private static final long serialVersionUID = 1L; + private String messageId; private String finalDate; private byte messageState; diff --git a/src/main/java/com/cloudhopper/smpp/pdu/ReplaceSm.java b/src/main/java/com/cloudhopper/smpp/pdu/ReplaceSm.java index 4d730bc4..8360192f 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/ReplaceSm.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/ReplaceSm.java @@ -34,6 +34,8 @@ public class ReplaceSm extends PduRequest { + private static final long serialVersionUID = 1L; + private String messageId; private Address sourceAddress; private String scheduleDeliveryTime; diff --git a/src/main/java/com/cloudhopper/smpp/pdu/ReplaceSmResp.java b/src/main/java/com/cloudhopper/smpp/pdu/ReplaceSmResp.java index abcc5bac..bf9987c5 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/ReplaceSmResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/ReplaceSmResp.java @@ -28,6 +28,8 @@ public class ReplaceSmResp extends PduResponse { + private static final long serialVersionUID = 1L; + public ReplaceSmResp() { super(SmppConstants.CMD_ID_REPLACE_SM_RESP, "replace_sm_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/SubmitSm.java b/src/main/java/com/cloudhopper/smpp/pdu/SubmitSm.java index e36fccd5..720a9b18 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/SubmitSm.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/SubmitSm.java @@ -24,6 +24,8 @@ public class SubmitSm extends BaseSm { + private static final long serialVersionUID = 1L; + public SubmitSm() { super(SmppConstants.CMD_ID_SUBMIT_SM, "submit_sm"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/SubmitSmResp.java b/src/main/java/com/cloudhopper/smpp/pdu/SubmitSmResp.java index 792eeb82..0f891ae2 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/SubmitSmResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/SubmitSmResp.java @@ -24,6 +24,8 @@ public class SubmitSmResp extends BaseSmResp { + private static final long serialVersionUID = 1L; + public SubmitSmResp() { super(SmppConstants.CMD_ID_SUBMIT_SM_RESP, "submit_sm_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/Unbind.java b/src/main/java/com/cloudhopper/smpp/pdu/Unbind.java index c2a291c7..dee477e8 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/Unbind.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/Unbind.java @@ -24,6 +24,8 @@ public class Unbind extends EmptyBody { + private static final long serialVersionUID = 1L; + public Unbind() { super(SmppConstants.CMD_ID_UNBIND, "unbind"); } diff --git a/src/main/java/com/cloudhopper/smpp/pdu/UnbindResp.java b/src/main/java/com/cloudhopper/smpp/pdu/UnbindResp.java index 27781da8..6f25beca 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/UnbindResp.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/UnbindResp.java @@ -27,6 +27,8 @@ public class UnbindResp extends EmptyBodyResp { + private static final long serialVersionUID = 1L; + public UnbindResp() { super(SmppConstants.CMD_ID_UNBIND_RESP, "unbind_resp"); } diff --git a/src/main/java/com/cloudhopper/smpp/tlv/Tlv.java b/src/main/java/com/cloudhopper/smpp/tlv/Tlv.java index e4badfcd..006c518c 100644 --- a/src/main/java/com/cloudhopper/smpp/tlv/Tlv.java +++ b/src/main/java/com/cloudhopper/smpp/tlv/Tlv.java @@ -22,6 +22,8 @@ import com.cloudhopper.commons.util.ByteArrayUtil; import com.cloudhopper.commons.util.HexUtil; + +import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.util.Arrays; @@ -30,7 +32,9 @@ * * @author joelauer (twitter: @jjlauer or http://twitter.com/jjlauer) */ -public class Tlv { +public class Tlv implements Serializable { + + private static final long serialVersionUID = 1L; private final short tag; private final byte[] value; // length is stored in array diff --git a/src/main/java/com/cloudhopper/smpp/type/Address.java b/src/main/java/com/cloudhopper/smpp/type/Address.java index 2b383c62..38b9fae7 100644 --- a/src/main/java/com/cloudhopper/smpp/type/Address.java +++ b/src/main/java/com/cloudhopper/smpp/type/Address.java @@ -26,12 +26,16 @@ import com.cloudhopper.smpp.util.PduUtil; import org.jboss.netty.buffer.ChannelBuffer; +import java.io.Serializable; + /** * Simple representation of an Address in SMPP. * * @author joelauer (twitter: @jjlauer or http://twitter.com/jjlauer) */ -public class Address { +public class Address implements Serializable { + + private static final long serialVersionUID = 1L; private byte ton; private byte npi;