/protocols/smpp/src/main/java/org/mobicents/protocols/smpp/message/DeliverSM.java

http://mobicents.googlecode.com/ · Java · 73 lines · 25 code · 8 blank · 40 comment · 0 complexity · 14bd0bb3f864a13cfa28e62ae2c60b08 MD5 · raw file

  1. /*
  2. * JBoss, Home of Professional Open Source
  3. * Copyright 2011, Red Hat, Inc. and individual contributors
  4. * by the @authors tag. See the copyright.txt in the distribution for a
  5. * full listing of individual contributors.
  6. *
  7. * This is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU Lesser General Public License as
  9. * published by the Free Software Foundation; either version 2.1 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This software is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this software; if not, write to the Free
  19. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21. */
  22. package org.mobicents.protocols.smpp.message;
  23. import org.slf4j.LoggerFactory;
  24. import org.mobicents.protocols.smpp.util.SMPPDate;
  25. /**
  26. * Deliver message. This message is sent from the SMSC to a Receiver ESME to
  27. * deliver a short message. It is also used to notify an ESME that submitted a
  28. * message using registered delivery that a message has reached it's end point
  29. * successfully.
  30. *
  31. * @version $Id: DeliverSM.java 457 2009-01-15 17:37:42Z orank $
  32. */
  33. public class DeliverSM extends SubmitSM {
  34. private static final long serialVersionUID = 2L;
  35. private static final String SPEC_VIOLATION = "Setting the {} on a "
  36. + "deliver_sm is in violation of the SMPP specification";
  37. /**
  38. * Construct a new DeliverSM.
  39. */
  40. public DeliverSM() {
  41. super(CommandId.DELIVER_SM);
  42. }
  43. /**
  44. * Setting a delivery time on a deliver_sm is in violation of the SMPP
  45. * specification.
  46. */
  47. public void setDeliveryTime(SMPPDate d) {
  48. LoggerFactory.getLogger(DeliverSM.class).warn(
  49. SPEC_VIOLATION, "delivery time");
  50. super.setDeliveryTime(d);
  51. }
  52. /**
  53. * Setting an expiry time on a deliver_sm is in violation of the SMPP
  54. * specification.
  55. */
  56. public void setExpiryTime(SMPPDate d) {
  57. LoggerFactory.getLogger(DeliverSM.class).warn(
  58. SPEC_VIOLATION, "expiry time");
  59. super.setExpiryTime(d);
  60. }
  61. @Override
  62. public int hashCode() {
  63. return super.hashCode() * 103;
  64. }
  65. }