/protocols/ss7/map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/supplementary/UnstructuredSSNotifyResponseIndicationImpl.java

http://mobicents.googlecode.com/ · Java · 160 lines · 67 code · 15 blank · 78 comment · 0 complexity · 711c0ba9a663fa4ce18701fa9bc00ffe MD5 · raw file

  1. /*
  2. * JBoss, Home of Professional Open Source
  3. * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual
  4. * contributors as indicated by the @authors tag. All rights reserved.
  5. * See the copyright.txt in the distribution for a full listing
  6. * of individual contributors.
  7. *
  8. * This copyrighted material is made available to anyone wishing to use,
  9. * modify, copy, or redistribute it subject to the terms and conditions
  10. * of the GNU General Public License, v. 2.0.
  11. *
  12. * This program 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. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License,
  18. * v. 2.0 along with this distribution; if not, write to the Free
  19. * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  20. * MA 02110-1301, USA.
  21. */
  22. package org.mobicents.protocols.ss7.map.service.supplementary;
  23. import org.mobicents.protocols.asn.AsnInputStream;
  24. import org.mobicents.protocols.asn.AsnOutputStream;
  25. import org.mobicents.protocols.asn.Tag;
  26. import org.mobicents.protocols.ss7.map.MessageImpl;
  27. import org.mobicents.protocols.ss7.map.api.MAPException;
  28. import org.mobicents.protocols.ss7.map.api.MAPMessageType;
  29. import org.mobicents.protocols.ss7.map.api.MAPOperationCode;
  30. import org.mobicents.protocols.ss7.map.api.MAPParsingComponentException;
  31. import org.mobicents.protocols.ss7.map.api.MAPParsingComponentExceptionReason;
  32. import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary;
  33. import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSNotifyResponseIndication;
  34. import org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive;
  35. /**
  36. * @author amit bhayani
  37. *
  38. */
  39. public class UnstructuredSSNotifyResponseIndicationImpl extends MessageImpl implements UnstructuredSSNotifyResponseIndication, MAPAsnPrimitive {
  40. public MAPDialogSupplementary getMAPDialog() {
  41. return (MAPDialogSupplementary) super.getMAPDialog();
  42. }
  43. @Override
  44. public MAPMessageType getMessageType() {
  45. return MAPMessageType.unstructuredSSNotify_Response;
  46. }
  47. @Override
  48. public int getOperationCode() {
  49. return MAPOperationCode.unstructuredSS_Notify;
  50. }
  51. /*
  52. * (non-Javadoc)
  53. *
  54. * @see org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#getTag()
  55. */
  56. @Override
  57. public int getTag() throws MAPException {
  58. return Tag.SEQUENCE;
  59. }
  60. /*
  61. * (non-Javadoc)
  62. *
  63. * @see
  64. * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#getTagClass()
  65. */
  66. @Override
  67. public int getTagClass() {
  68. return Tag.CLASS_UNIVERSAL;
  69. }
  70. /*
  71. * (non-Javadoc)
  72. *
  73. * @see
  74. * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#getIsPrimitive
  75. * ()
  76. */
  77. @Override
  78. public boolean getIsPrimitive() {
  79. return false;
  80. }
  81. /*
  82. * (non-Javadoc)
  83. *
  84. * @see
  85. * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#decodeAll(
  86. * org.mobicents.protocols.asn.AsnInputStream)
  87. */
  88. @Override
  89. public void decodeAll(AsnInputStream ansIS) throws MAPParsingComponentException {
  90. throw new MAPParsingComponentException("UnstructuredSSNotifyResponseIndication has no MAP message primitive",
  91. MAPParsingComponentExceptionReason.MistypedParameter);
  92. }
  93. /*
  94. * (non-Javadoc)
  95. *
  96. * @see
  97. * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#decodeData
  98. * (org.mobicents.protocols.asn.AsnInputStream, int)
  99. */
  100. @Override
  101. public void decodeData(AsnInputStream ansIS, int length) throws MAPParsingComponentException {
  102. throw new MAPParsingComponentException("UnstructuredSSNotifyResponseIndication has no MAP message primitive",
  103. MAPParsingComponentExceptionReason.MistypedParameter);
  104. }
  105. /*
  106. * (non-Javadoc)
  107. *
  108. * @see
  109. * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#encodeAll(
  110. * org.mobicents.protocols.asn.AsnOutputStream)
  111. */
  112. @Override
  113. public void encodeAll(AsnOutputStream asnOs) throws MAPException {
  114. throw new MAPException("UnstructuredSSNotifyResponseIndication has no MAP message primitive");
  115. }
  116. /*
  117. * (non-Javadoc)
  118. *
  119. * @see
  120. * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#encodeAll(
  121. * org.mobicents.protocols.asn.AsnOutputStream, int, int)
  122. */
  123. @Override
  124. public void encodeAll(AsnOutputStream asnOs, int tagClass, int tag) throws MAPException {
  125. throw new MAPException("UnstructuredSSNotifyResponseIndication has no MAP message primitive");
  126. }
  127. /*
  128. * (non-Javadoc)
  129. *
  130. * @see
  131. * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#encodeData
  132. * (org.mobicents.protocols.asn.AsnOutputStream)
  133. */
  134. @Override
  135. public void encodeData(AsnOutputStream asnOs) throws MAPException {
  136. throw new MAPException("UnstructuredSSNotifyResponseIndication has no MAP message primitive");
  137. }
  138. @Override
  139. public String toString() {
  140. StringBuilder sb = new StringBuilder();
  141. sb.append("UnstructuredSSNotifyResponse [");
  142. sb.append("]");
  143. return sb.toString();
  144. }
  145. }