Revision: 22781
Author: [email protected]
Date: Tue Aug 7 03:52:23 2012
Log: MAP RA update to include last implemented MAP operations
http://code.google.com/p/mobicents/source/detail?r=22781
Added:
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/oam
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/oam/wrappers
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/oam/wrappers/MAPDialogOamWrapper.java
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/oam/wrappers/MAPServiceOamWrapper.java
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/oam/wrappers/OamMessageWrapper.java
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/pdpContextActivation
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/pdpContextActivation/wrappers
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/pdpContextActivation/wrappers/MAPDialogPdpContextActivationWrapper.java
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/pdpContextActivation/wrappers/MAPServicePdpContextActivationWrapper.java
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/pdpContextActivation/wrappers/PdpContextActivationMessageWrapper.java
Deleted:
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/subscriberInformation
=======================================
--- /dev/null
+++
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/oam/wrappers/MAPDialogOamWrapper.java
Tue Aug 7 03:52:23 2012
@@ -0,0 +1,47 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * 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.
+ */
+
+package org.mobicents.slee.resource.map.service.oam.wrappers;
+
+import org.mobicents.protocols.ss7.map.api.service.oam.MAPDialogOam;
+import org.mobicents.slee.resource.map.MAPDialogActivityHandle;
+import org.mobicents.slee.resource.map.MAPResourceAdaptor;
+import org.mobicents.slee.resource.map.wrappers.MAPDialogWrapper;
+
+/**
+ *
+ * @author sergey vetyutnev
+ *
+ */
+public class MAPDialogOamWrapper extends MAPDialogWrapper<MAPDialogOam>
implements MAPDialogOam {
+
+ public MAPDialogOamWrapper(MAPDialogOam wrappedDialog,
MAPDialogActivityHandle activityHandle,
+ MAPResourceAdaptor ra) {
+ super(wrappedDialog, activityHandle, ra);
+ }
+
+ @Override
+ public MAPDialogOam getWrappedDialog() {
+ return this.wrappedDialog;
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/oam/wrappers/MAPServiceOamWrapper.java
Tue Aug 7 03:52:23 2012
@@ -0,0 +1,99 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * 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.
+ */
+
+package org.mobicents.slee.resource.map.service.oam.wrappers;
+
+import org.mobicents.protocols.ss7.map.api.MAPApplicationContext;
+import org.mobicents.protocols.ss7.map.api.MAPException;
+import org.mobicents.protocols.ss7.map.api.MAPProvider;
+import org.mobicents.protocols.ss7.map.api.dialog.ServingCheckData;
+import org.mobicents.protocols.ss7.map.api.primitives.AddressString;
+import org.mobicents.protocols.ss7.map.api.service.oam.MAPDialogOam;
+import org.mobicents.protocols.ss7.map.api.service.oam.MAPServiceOam;
+import
org.mobicents.protocols.ss7.map.api.service.oam.MAPServiceOamListener;
+import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress;
+import org.mobicents.slee.resource.map.MAPDialogActivityHandle;
+import org.mobicents.slee.resource.map.wrappers.MAPProviderWrapper;
+
+/**
+ *
+ * @author sergey vetyutnev
+ *
+ */
+public class MAPServiceOamWrapper implements MAPServiceOam {
+
+ protected MAPServiceOam wrappedOam;
+ protected MAPProviderWrapper mapProviderWrapper;
+
+ /**
+ * @param mapServiceOam
+ */
+ public MAPServiceOamWrapper(MAPProviderWrapper mapProviderWrapper,
MAPServiceOam mapOam) {
+ this.wrappedOam = mapOam;
+ this.mapProviderWrapper = mapProviderWrapper;
+ }
+
+ public void acivate() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void deactivate() {
+ throw new UnsupportedOperationException();
+ }
+
+ public MAPProvider getMAPProvider() {
+ return this.mapProviderWrapper;
+ }
+
+ public ServingCheckData isServingService(MAPApplicationContext
dialogApplicationContext) {
+ return
this.wrappedOam.isServingService(dialogApplicationContext);
+ }
+
+ public boolean isActivated() {
+ return this.wrappedOam.isActivated();
+ }
+
+ public void addMAPServiceListener(MAPServiceOamListener arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public MAPDialogOam createNewDialog(MAPApplicationContext appCntx,
SccpAddress origAddress, AddressString origReference, SccpAddress
destAddress,
+ AddressString destReference) throws MAPException {
+ MAPDialogOam mapDialog = this.wrappedOam.createNewDialog(appCntx,
origAddress, origReference, destAddress, destReference);
+ MAPDialogActivityHandle activityHandle = new
MAPDialogActivityHandle(mapDialog.getDialogId());
+ MAPDialogOamWrapper dw = new MAPDialogOamWrapper(mapDialog,
activityHandle, this.mapProviderWrapper.getRa());
+ mapDialog.setUserObject(dw);
+
+ try {
+
this.mapProviderWrapper.getRa().startSuspendedActivity(dw);
+ } catch (Exception e) {
+ throw new MAPException(e);
+ }
+
+ return dw;
+ }
+
+ public void removeMAPServiceListener(MAPServiceOamListener arg0) {
+ throw new UnsupportedOperationException();
+ }
+}
=======================================
--- /dev/null
+++
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/oam/wrappers/OamMessageWrapper.java
Tue Aug 7 03:52:23 2012
@@ -0,0 +1,44 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * 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.
+ */
+
+package org.mobicents.slee.resource.map.service.oam.wrappers;
+
+import org.mobicents.protocols.ss7.map.api.service.oam.MAPDialogOam;
+import org.mobicents.protocols.ss7.map.api.service.oam.OamMessage;
+import org.mobicents.slee.resource.map.wrappers.MAPMessageWrapper;
+
+/**
+ *
+ * @author sergey vetyutnev
+ *
+ */
+public class OamMessageWrapper<T extends OamMessage> extends
MAPMessageWrapper<T> implements OamMessage {
+
+ public OamMessageWrapper(MAPDialogOamWrapper mapDialogWrapper, String
eventTypeName, T wrappedEvent) {
+ super(mapDialogWrapper, eventTypeName, wrappedEvent);
+ }
+
+ public MAPDialogOam getMAPDialog() {
+ return (MAPDialogOamWrapper) this.mapDialogWrapper;
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/pdpContextActivation/wrappers/MAPDialogPdpContextActivationWrapper.java
Tue Aug 7 03:52:23 2012
@@ -0,0 +1,47 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * 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.
+ */
+
+package
org.mobicents.slee.resource.map.service.pdpContextActivation.wrappers;
+
+import
org.mobicents.protocols.ss7.map.api.service.pdpContextActivation.MAPDialogPdpContextActivation;
+import org.mobicents.slee.resource.map.MAPDialogActivityHandle;
+import org.mobicents.slee.resource.map.MAPResourceAdaptor;
+import org.mobicents.slee.resource.map.wrappers.MAPDialogWrapper;
+
+/**
+ *
+ * @author sergey vetyutnev
+ *
+ */
+public class MAPDialogPdpContextActivationWrapper extends
MAPDialogWrapper<MAPDialogPdpContextActivation> implements
MAPDialogPdpContextActivation {
+
+ public MAPDialogPdpContextActivationWrapper(MAPDialogPdpContextActivation
wrappedDialog, MAPDialogActivityHandle activityHandle,
+ MAPResourceAdaptor ra) {
+ super(wrappedDialog, activityHandle, ra);
+ }
+
+ @Override
+ public MAPDialogPdpContextActivation getWrappedDialog() {
+ return this.wrappedDialog;
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/pdpContextActivation/wrappers/MAPServicePdpContextActivationWrapper.java
Tue Aug 7 03:52:23 2012
@@ -0,0 +1,99 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * 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.
+ */
+
+package
org.mobicents.slee.resource.map.service.pdpContextActivation.wrappers;
+
+import org.mobicents.protocols.ss7.map.api.MAPApplicationContext;
+import org.mobicents.protocols.ss7.map.api.MAPException;
+import org.mobicents.protocols.ss7.map.api.MAPProvider;
+import org.mobicents.protocols.ss7.map.api.dialog.ServingCheckData;
+import org.mobicents.protocols.ss7.map.api.primitives.AddressString;
+import
org.mobicents.protocols.ss7.map.api.service.pdpContextActivation.MAPDialogPdpContextActivation;
+import
org.mobicents.protocols.ss7.map.api.service.pdpContextActivation.MAPServicePdpContextActivation;
+import
org.mobicents.protocols.ss7.map.api.service.pdpContextActivation.MAPServicePdpContextActivationListener;
+import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress;
+import org.mobicents.slee.resource.map.MAPDialogActivityHandle;
+import org.mobicents.slee.resource.map.wrappers.MAPProviderWrapper;
+
+/**
+ *
+ * @author sergey vetyutnev
+ *
+ */
+public class MAPServicePdpContextActivationWrapper implements
MAPServicePdpContextActivation {
+
+ protected MAPServicePdpContextActivation wrappedPdpContextActivation;
+ protected MAPProviderWrapper mapProviderWrapper;
+
+ /**
+ * @param mapServicePdpContextActivation
+ */
+ public MAPServicePdpContextActivationWrapper(MAPProviderWrapper
mapProviderWrapper, MAPServicePdpContextActivation mapPdpContextActivation)
{
+ this.wrappedPdpContextActivation = mapPdpContextActivation;
+ this.mapProviderWrapper = mapProviderWrapper;
+ }
+
+ public void acivate() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void deactivate() {
+ throw new UnsupportedOperationException();
+ }
+
+ public MAPProvider getMAPProvider() {
+ return this.mapProviderWrapper;
+ }
+
+ public ServingCheckData isServingService(MAPApplicationContext
dialogApplicationContext) {
+ return
this.wrappedPdpContextActivation.isServingService(dialogApplicationContext);
+ }
+
+ public boolean isActivated() {
+ return this.wrappedPdpContextActivation.isActivated();
+ }
+
+ public void addMAPServiceListener(MAPServicePdpContextActivationListener
arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ public MAPDialogPdpContextActivation
createNewDialog(MAPApplicationContext appCntx, SccpAddress origAddress,
AddressString origReference,
+ SccpAddress destAddress, AddressString destReference) throws
MAPException {
+ MAPDialogPdpContextActivation mapDialog =
this.wrappedPdpContextActivation.createNewDialog(appCntx, origAddress,
origReference, destAddress, destReference);
+ MAPDialogActivityHandle activityHandle = new
MAPDialogActivityHandle(mapDialog.getDialogId());
+ MAPDialogPdpContextActivationWrapper dw = new
MAPDialogPdpContextActivationWrapper(mapDialog, activityHandle,
this.mapProviderWrapper.getRa());
+ mapDialog.setUserObject(dw);
+
+ try {
+
this.mapProviderWrapper.getRa().startSuspendedActivity(dw);
+ } catch (Exception e) {
+ throw new MAPException(e);
+ }
+
+ return dw;
+ }
+
+ public void
removeMAPServiceListener(MAPServicePdpContextActivationListener arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/servers/jain-slee/resources/map/ra/src/main/java/org/mobicents/slee/resource/map/service/pdpContextActivation/wrappers/PdpContextActivationMessageWrapper.java
Tue Aug 7 03:52:23 2012
@@ -0,0 +1,44 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * 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.
+ */
+
+package
org.mobicents.slee.resource.map.service.pdpContextActivation.wrappers;
+
+import
org.mobicents.protocols.ss7.map.api.service.pdpContextActivation.MAPDialogPdpContextActivation;
+import
org.mobicents.protocols.ss7.map.api.service.pdpContextActivation.PdpContextActivationMessage;
+import org.mobicents.slee.resource.map.wrappers.MAPMessageWrapper;
+
+/**
+ *
+ * @author sergey vetyutnev
+ *
+ */
+public class PdpContextActivationMessageWrapper<T extends
PdpContextActivationMessage> extends MAPMessageWrapper<T> implements
PdpContextActivationMessage {
+
+ public
PdpContextActivationMessageWrapper(MAPDialogPdpContextActivationWrapper
mapDialogWrapper, String eventTypeName, T wrappedEvent) {
+ super(mapDialogWrapper, eventTypeName, wrappedEvent);
+ }
+
+ public MAPDialogPdpContextActivation getMAPDialog() {
+ return (MAPDialogPdpContextActivationWrapper)
this.mapDialogWrapper;
+ }
+
+}