2 new revisions:
Revision: 35051363f0b3
Author: Oifa Yulian <[email protected]>
Date: Sun Jul 8 07:39:01 2012
Log: Updated Continuity ISUP Message
http://code.google.com/p/jss7/source/detail?r=35051363f0b3
Revision: b0115f8d5783
Author: Oifa Yulian <[email protected]>
Date: Sun Jul 8 07:39:17 2012
Log: Merge branch 'master' of https://code.google.com/p/jss7
http://code.google.com/p/jss7/source/detail?r=b0115f8d5783
==============================================================================
Revision: 35051363f0b3
Author: Oifa Yulian <[email protected]>
Date: Sun Jul 8 07:39:01 2012
Log: Updated Continuity ISUP Message
http://code.google.com/p/jss7/source/detail?r=35051363f0b3
Added:
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/message/parameter/ContinuityIndicators.java
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/parameter/ContinuityIndicatorsImpl.java
Deleted:
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/message/parameter/ContinuitiyIndicators.java
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/parameter/ContinuitiyIndicatorsImpl.java
Modified:
/hardware/dahdi/java/pom.xml
/hardware/dialogic/java/pom.xml
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/ISUPParameterFactory.java
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/message/ContinuityMessage.java
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/ContinuityMessageImpl.java
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/parameter/ISUPParameterFactoryImpl.java
/service/pom.xml
/sgw/gateway/pom.xml
=======================================
--- /dev/null
+++
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/message/parameter/ContinuityIndicators.java
Sun Jul 8 07:39:01 2012
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+/**
+ * Start time:12:34:42 2009-07-23<br>
+ * Project: mobicents-isup-stack<br>
+ *
+ * @author <a href="mailto:[email protected]">Bartosz Baranowski </a>
+ */
+package org.mobicents.protocols.ss7.isup.message.parameter;
+
+/**
+ * Start time:12:34:42 2009-07-23<br>
+ * Project: mobicents-isup-stack<br>
+ *
+ * @author <a href="mailto:[email protected]">Bartosz Baranowski </a>
+ */
+public interface ContinuityIndicators extends ISUPParameter {
+ public static final int _PARAMETER_CODE = 0x10;
+
+ /**
+ * See Q.763 3.18
+ */
+ public static final boolean _CONTINUITY_CHECK_FAILED = false;
+
+ /**
+ * See Q.763 3.18
+ */
+ public static final boolean _CONTINUITY_CHECK_SUCCESSFUL = true;
+
+ public boolean isContinuityCheck();
+
+ public void setContinuityCheck(boolean continuityCheck);
+}
=======================================
--- /dev/null
+++
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/parameter/ContinuityIndicatorsImpl.java
Sun Jul 8 07:39:01 2012
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+/**
+ * Start time:18:28:42 2009-03-30<br>
+ * Project: mobicents-isup-stack<br>
+ *
+ * @author <a href="mailto:[email protected]"> Bartosz Baranowski
+ * </a>
+ *
+ */
+package org.mobicents.protocols.ss7.isup.impl.message.parameter;
+
+import java.io.IOException;
+
+import org.mobicents.protocols.ss7.isup.ParameterException;
+import
org.mobicents.protocols.ss7.isup.message.parameter.ContinuityIndicators;
+
+/**
+ * Start time:18:28:42 2009-03-30<br>
+ * Project: mobicents-isup-stack<br>
+ *
+ * @author <a href="mailto:[email protected]"> Bartosz Baranowski
+ * </a>
+ */
+public class ContinuityIndicatorsImpl extends AbstractISUPParameter
implements ContinuityIndicators{
+
+
+ private final static int _TURN_ON = 1;
+ private final static int _TURN_OFF = 0;
+
+
+
+ private boolean continuityCheck = false;
+
+ public ContinuityIndicatorsImpl(byte[] b) throws ParameterException {
+ super();
+ decode(b);
+ }
+
+ public ContinuityIndicatorsImpl() {
+ super();
+
+ }
+
+ public ContinuityIndicatorsImpl(boolean continuityCheck) {
+ super();
+ this.continuityCheck = continuityCheck;
+ }
+
+ public int decode(byte[] b) throws ParameterException {
+ if (b == null || b.length != 1) {
+ throw new ParameterException("byte[] must not be null or have different
size than 1");
+ }
+ this.continuityCheck = (b[0] & 0x01) == _TURN_ON;
+ return 1;
+ }
+
+ public byte[] encode() throws ParameterException {
+ return new byte[] { (byte) (this.continuityCheck ? _TURN_ON : _TURN_OFF)
};
+ }
+
+ public boolean isContinuityCheck() {
+ return continuityCheck;
+ }
+
+ public void setContinuityCheck(boolean continuityCheck) {
+ this.continuityCheck = continuityCheck;
+ }
+
+ public int getCode() {
+
+ return _PARAMETER_CODE;
+ }
+}
=======================================
---
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/message/parameter/ContinuitiyIndicators.java
Mon Apr 23 10:53:14 2012
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-/**
- * Start time:12:34:42 2009-07-23<br>
- * Project: mobicents-isup-stack<br>
- *
- * @author <a href="mailto:[email protected]">Bartosz Baranowski </a>
- */
-package org.mobicents.protocols.ss7.isup.message.parameter;
-
-/**
- * Start time:12:34:42 2009-07-23<br>
- * Project: mobicents-isup-stack<br>
- *
- * @author <a href="mailto:[email protected]">Bartosz Baranowski </a>
- */
-public interface ContinuitiyIndicators extends ISUPParameter {
- public static final int _PARAMETER_CODE = 0x10;
-
- /**
- * See Q.763 3.18
- */
- public static final boolean _CONTINUITY_CHECK_FAILED = false;
-
- /**
- * See Q.763 3.18
- */
- public static final boolean _CONTINUITY_CHECK_SUCCESSFUL = true;
-
- public boolean isContinuityCheck();
-
- public void setContinuityCheck(boolean continuityCheck);
-}
=======================================
---
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/parameter/ContinuitiyIndicatorsImpl.java
Mon Apr 23 10:53:14 2012
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-/**
- * Start time:18:28:42 2009-03-30<br>
- * Project: mobicents-isup-stack<br>
- *
- * @author <a href="mailto:[email protected]"> Bartosz Baranowski
- * </a>
- *
- */
-package org.mobicents.protocols.ss7.isup.impl.message.parameter;
-
-import java.io.IOException;
-
-import org.mobicents.protocols.ss7.isup.ParameterException;
-import
org.mobicents.protocols.ss7.isup.message.parameter.ContinuitiyIndicators;
-
-/**
- * Start time:18:28:42 2009-03-30<br>
- * Project: mobicents-isup-stack<br>
- *
- * @author <a href="mailto:[email protected]"> Bartosz Baranowski
- * </a>
- */
-public class ContinuitiyIndicatorsImpl extends AbstractISUPParameter
implements ContinuitiyIndicators{
-
-
- private final static int _TURN_ON = 1;
- private final static int _TURN_OFF = 0;
-
-
-
- private boolean continuityCheck = false;
-
- public ContinuitiyIndicatorsImpl(byte[] b) throws ParameterException {
- super();
- decode(b);
- }
-
- public ContinuitiyIndicatorsImpl() {
- super();
-
- }
-
- public ContinuitiyIndicatorsImpl(boolean continuityCheck) {
- super();
- this.continuityCheck = continuityCheck;
- }
-
- public int decode(byte[] b) throws ParameterException {
- if (b == null || b.length != 1) {
- throw new ParameterException("byte[] must not be null or have different
size than 1");
- }
- this.continuityCheck = (b[0] & 0x01) == _TURN_ON;
- return 1;
- }
-
- public byte[] encode() throws ParameterException {
- return new byte[] { (byte) (this.continuityCheck ? _TURN_ON : _TURN_OFF)
};
- }
-
- public boolean isContinuityCheck() {
- return continuityCheck;
- }
-
- public void setContinuityCheck(boolean continuityCheck) {
- this.continuityCheck = continuityCheck;
- }
-
- public int getCode() {
-
- return _PARAMETER_CODE;
- }
-}
=======================================
--- /hardware/dahdi/java/pom.xml Wed Jul 4 07:10:07 2012
+++ /hardware/dahdi/java/pom.xml Sun Jul 8 07:39:01 2012
@@ -27,6 +27,7 @@
<dependency>
<groupId>org.mobicents.protocols.ss7.hardware</groupId>
<artifactId>linkset</artifactId>
+ <version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.mobicents.protocols.ss7.mtp</groupId>
=======================================
--- /hardware/dialogic/java/pom.xml Wed Jul 4 07:10:07 2012
+++ /hardware/dialogic/java/pom.xml Sun Jul 8 07:39:01 2012
@@ -28,6 +28,7 @@
<dependency>
<groupId>org.mobicents.protocols.ss7.hardware</groupId>
<artifactId>linkset</artifactId>
+ <version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.mobicents.protocols.ss7.mtp</groupId>
=======================================
---
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/ISUPParameterFactory.java
Sun Jun 17 08:45:31 2012
+++
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/ISUPParameterFactory.java
Sun Jul 8 07:39:01 2012
@@ -94,7 +94,7 @@
ConnectionRequest createConnectionRequest();
- ContinuitiyIndicators createContinuitiyIndicators();
+ ContinuityIndicators createContinuityIndicators();
CorrelationID createCorrelationID();
=======================================
---
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/message/ContinuityMessage.java
Mon Apr 23 10:53:14 2012
+++
/isup/isup-api/src/main/java/org/mobicents/protocols/ss7/isup/message/ContinuityMessage.java
Sun Jul 8 07:39:01 2012
@@ -22,6 +22,7 @@
package org.mobicents.protocols.ss7.isup.message;
+import
org.mobicents.protocols.ss7.isup.message.parameter.ContinuityIndicators;
/**
* Start time:09:54:07 2009-07-23<br>
* Project: mobicents-isup-stack<br>
@@ -75,4 +76,8 @@
* Continuity Message, Q.763 reference table 28 <br> {@link
ContinuityMessage}
*/
public static final int MESSAGE_CODE = 0x05;
-}
+
+ public void setContinuityIndicators(ContinuityIndicators value);
+
+ public ContinuityIndicators getContinuityIndicators();
+}
=======================================
---
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/ContinuityMessageImpl.java
Mon Apr 23 10:53:14 2012
+++
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/ContinuityMessageImpl.java
Sun Jul 8 07:39:01 2012
@@ -32,7 +32,9 @@
import org.mobicents.protocols.ss7.isup.ParameterException;
import org.mobicents.protocols.ss7.isup.message.ContinuityMessage;
import org.mobicents.protocols.ss7.isup.message.parameter.MessageType;
-
+import
org.mobicents.protocols.ss7.isup.message.parameter.ContinuityIndicators;
+import
org.mobicents.protocols.ss7.isup.impl.message.parameter.AbstractISUPParameter;
+import
org.mobicents.protocols.ss7.isup.impl.message.parameter.MessageTypeImpl;
/**
* Start time:23:59:08 2009-09-06<br>
* Project: mobicents-isup-stack<br>
@@ -41,7 +43,12 @@
* </a>
*/
public class ContinuityMessageImpl extends ISUPMessageImpl implements
ContinuityMessage {
-
+ public static final MessageType _MESSAGE_TYPE = new
MessageTypeImpl(MESSAGE_CODE);
+ private static final int _MANDATORY_VAR_COUNT = 1;
+
+ static final int _INDEX_F_MessageType = 0;
+ static final int _INDEX_F_ContinuityIndicators = 1;
+
/**
*
* @param source
@@ -57,8 +64,21 @@
*/
protected int decodeMandatoryParameters(ISUPParameterFactory
parameterFactory,byte[] b, int index) throws ParameterException {
- // TODO Auto-generated method stub
- return 0;
+ int localIndex = index;
+ index += super.decodeMandatoryParameters(parameterFactory, b,
index);
+ if (b.length - index == 1)
+ {
+ byte[] continuityIndicators = new byte[1];
+ continuityIndicators[0] = b[index++];
+
+ ContinuityIndicators _ci =
parameterFactory.createContinuityIndicators();
+
((AbstractISUPParameter)_ci).decode(continuityIndicators);
+ this.setContinuityIndicators(_ci);
+ } else {
+ throw new ParameterException("byte[] must have exact one
octets");
+ }
+
+ return index-localIndex;
}
/* (non-Javadoc)
@@ -66,7 +86,7 @@
*/
protected void decodeMandatoryVariableBody(ISUPParameterFactory
parameterFactory,byte[] parameterBody, int parameterIndex) throws
ParameterException {
- // TODO Auto-generated method stub
+ throw new UnsupportedOperationException("This message does not support
mandatory variable parameters.");
}
@@ -75,17 +95,38 @@
*/
protected void decodeOptionalBody(ISUPParameterFactory
parameterFactory,byte[] parameterBody, byte parameterCode) throws
ParameterException {
- // TODO Auto-generated method stub
-
- }
-
+ throw new UnsupportedOperationException("This message does not support
optional parameters.");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.mobicents.protocols.ss7.isup.message.ContinuityMessage#
+ * getContinuitiyIndicators()
+ */
+ public ContinuityIndicators getContinuityIndicators() {
+ return (ContinuityIndicators)
super.o_Parameters.get(this._INDEX_F_ContinuityIndicators);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.mobicents.protocols.ss7.isup.message.ContinuityMessage#
+ * setContinuitiyIndicators
+ * (org.mobicents.protocols.ss7.isup.message.parameter
+ * .ContinuitiyIndicators)
+ */
+ public void setContinuityIndicators(ContinuityIndicators value) {
+ super.o_Parameters.put(this._INDEX_F_ContinuityIndicators,
value);
+
+ }
+
/* (non-Javadoc)
* @see
org.mobicents.protocols.ss7.isup.ISUPMessageImpl#getMessageType()
*/
public MessageType getMessageType() {
- // TODO Auto-generated method stub
- return null;
+ return this._MESSAGE_TYPE;
}
/* (non-Javadoc)
@@ -93,8 +134,7 @@
*/
protected int getNumberOfMandatoryVariableLengthParameters() {
- // TODO Auto-generated method stub
- return 0;
+ return _MANDATORY_VAR_COUNT;
}
/* (non-Javadoc)
@@ -102,12 +142,15 @@
*/
public boolean hasAllMandatoryParameters() {
- throw new UnsupportedOperationException();
+ if (super.f_Parameters.get(_INDEX_F_ContinuityIndicators) !=
null) {
+ return true;
+ } else {
+ return false;
+ }
}
- protected boolean optionalPartIsPossible() {
-
- throw new UnsupportedOperationException();
+ protected boolean optionalPartIsPossible() {
+ return false;
}
}
=======================================
---
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/parameter/ISUPParameterFactoryImpl.java
Mon Apr 23 10:53:14 2012
+++
/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/parameter/ISUPParameterFactoryImpl.java
Sun Jul 8 07:39:01 2012
@@ -187,9 +187,9 @@
return new ConnectionRequestImpl();
}
- public ContinuitiyIndicators createContinuitiyIndicators() {
-
- return new ContinuitiyIndicatorsImpl();
+ public ContinuityIndicators createContinuityIndicators() {
+
+ return new ContinuityIndicatorsImpl();
}
public CorrelationID createCorrelationID() {
=======================================
--- /service/pom.xml Wed Jul 4 07:10:07 2012
+++ /service/pom.xml Sun Jul 8 07:39:01 2012
@@ -45,8 +45,9 @@
<groupId>org.mobicents.protocols.ss7.mtp</groupId>
</dependency>
<dependency>
- <artifactId>linkset</artifactId>
<groupId>org.mobicents.protocols.ss7.hardware</groupId>
+ <artifactId>linkset</artifactId>
+ <version>${pom.version}</version>
</dependency>
<!-- Hardware Dahdi Java
=======================================
--- /sgw/gateway/pom.xml Wed Jul 4 07:10:07 2012
+++ /sgw/gateway/pom.xml Sun Jul 8 07:39:01 2012
@@ -91,8 +91,9 @@
<artifactId>javolution</artifactId>
</dependency>
<dependency>
- <artifactId>shell</artifactId>
-
<groupId>org.mobicents.protocols.ss7.management</groupId>
+ <groupId>org.mobicents.protocols.ss7.hardware</groupId>
+ <artifactId>linkset</artifactId>
+ <version>${pom.version}</version>
</dependency>
</dependencies>
<build>
==============================================================================
Revision: b0115f8d5783
Author: Oifa Yulian <[email protected]>
Date: Sun Jul 8 07:39:17 2012
Log: Merge branch 'master' of https://code.google.com/p/jss7
http://code.google.com/p/jss7/source/detail?r=b0115f8d5783
Modified:
/sgw/gateway/pom.xml
=======================================
--- /sgw/gateway/pom.xml Sun Jul 8 07:39:01 2012
+++ /sgw/gateway/pom.xml Sun Jul 8 07:39:17 2012
@@ -64,13 +64,6 @@
<groupId>org.mobicents.protocols.ss7.hardware</groupId>
</dependency>
- <!-- Service used for Shell Executor -->
- <dependency>
- <artifactId>mobicents-ss7</artifactId>
- <groupId>org.mobicents.protocols.ss7</groupId>
- <version>${pom.version}</version>
- </dependency>
-
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>