PageRenderTime 23ms CodeModel.GetById 17ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/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 */
 22package org.mobicents.protocols.ss7.map.service.supplementary;
 23
 24import org.mobicents.protocols.asn.AsnInputStream;
 25import org.mobicents.protocols.asn.AsnOutputStream;
 26import org.mobicents.protocols.asn.Tag;
 27import org.mobicents.protocols.ss7.map.MessageImpl;
 28import org.mobicents.protocols.ss7.map.api.MAPException;
 29import org.mobicents.protocols.ss7.map.api.MAPMessageType;
 30import org.mobicents.protocols.ss7.map.api.MAPOperationCode;
 31import org.mobicents.protocols.ss7.map.api.MAPParsingComponentException;
 32import org.mobicents.protocols.ss7.map.api.MAPParsingComponentExceptionReason;
 33import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary;
 34import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSNotifyResponseIndication;
 35import org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive;
 36
 37/**
 38 * @author amit bhayani
 39 * 
 40 */
 41public class UnstructuredSSNotifyResponseIndicationImpl extends MessageImpl implements UnstructuredSSNotifyResponseIndication, MAPAsnPrimitive {
 42
 43	public MAPDialogSupplementary getMAPDialog() {
 44		return (MAPDialogSupplementary) super.getMAPDialog();
 45	}
 46
 47	@Override
 48	public MAPMessageType getMessageType() {
 49		return MAPMessageType.unstructuredSSNotify_Response;
 50	}
 51
 52	@Override
 53	public int getOperationCode() {
 54		return MAPOperationCode.unstructuredSS_Notify;
 55	}
 56
 57	/*
 58	 * (non-Javadoc)
 59	 * 
 60	 * @see org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#getTag()
 61	 */
 62	@Override
 63	public int getTag() throws MAPException {
 64		return Tag.SEQUENCE;
 65	}
 66
 67	/*
 68	 * (non-Javadoc)
 69	 * 
 70	 * @see
 71	 * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#getTagClass()
 72	 */
 73	@Override
 74	public int getTagClass() {
 75		return Tag.CLASS_UNIVERSAL;
 76	}
 77
 78	/*
 79	 * (non-Javadoc)
 80	 * 
 81	 * @see
 82	 * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#getIsPrimitive
 83	 * ()
 84	 */
 85	@Override
 86	public boolean getIsPrimitive() {
 87		return false;
 88	}
 89
 90	/*
 91	 * (non-Javadoc)
 92	 * 
 93	 * @see
 94	 * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#decodeAll(
 95	 * org.mobicents.protocols.asn.AsnInputStream)
 96	 */
 97	@Override
 98	public void decodeAll(AsnInputStream ansIS) throws MAPParsingComponentException {
 99		throw new MAPParsingComponentException("UnstructuredSSNotifyResponseIndication has no MAP message primitive",
100				MAPParsingComponentExceptionReason.MistypedParameter);
101	}
102
103	/*
104	 * (non-Javadoc)
105	 * 
106	 * @see
107	 * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#decodeData
108	 * (org.mobicents.protocols.asn.AsnInputStream, int)
109	 */
110	@Override
111	public void decodeData(AsnInputStream ansIS, int length) throws MAPParsingComponentException {
112		throw new MAPParsingComponentException("UnstructuredSSNotifyResponseIndication has no MAP message primitive",
113				MAPParsingComponentExceptionReason.MistypedParameter);
114	}
115
116	/*
117	 * (non-Javadoc)
118	 * 
119	 * @see
120	 * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#encodeAll(
121	 * org.mobicents.protocols.asn.AsnOutputStream)
122	 */
123	@Override
124	public void encodeAll(AsnOutputStream asnOs) throws MAPException {
125		throw new MAPException("UnstructuredSSNotifyResponseIndication has no MAP message primitive");
126	}
127
128	/*
129	 * (non-Javadoc)
130	 * 
131	 * @see
132	 * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#encodeAll(
133	 * org.mobicents.protocols.asn.AsnOutputStream, int, int)
134	 */
135	@Override
136	public void encodeAll(AsnOutputStream asnOs, int tagClass, int tag) throws MAPException {
137		throw new MAPException("UnstructuredSSNotifyResponseIndication has no MAP message primitive");
138	}
139
140	/*
141	 * (non-Javadoc)
142	 * 
143	 * @see
144	 * org.mobicents.protocols.ss7.map.primitives.MAPAsnPrimitive#encodeData
145	 * (org.mobicents.protocols.asn.AsnOutputStream)
146	 */
147	@Override
148	public void encodeData(AsnOutputStream asnOs) throws MAPException {
149		throw new MAPException("UnstructuredSSNotifyResponseIndication has no MAP message primitive");
150	}
151
152	@Override
153	public String toString() {
154		StringBuilder sb = new StringBuilder();
155		sb.append("UnstructuredSSNotifyResponse [");
156		sb.append("]");
157
158		return sb.toString();
159	}
160}