use of org.mobicents.slee.resource.diameter.base.DiameterActivityImpl in project jain-slee.diameter by RestComm.
the class DiameterS6aResourceAdaptor method addActivity.
// Session Management --------------------------------------------------
/**
* Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map.
*
* @param ac the activity that has been created
*/
private void addActivity(DiameterActivity ac, boolean suspended) {
try {
// Inform SLEE that Activity Started
DiameterActivityImpl activity = (DiameterActivityImpl) ac;
if (suspended) {
sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, DEFAULT_ACTIVITY_FLAGS);
} else {
sleeEndpoint.startActivity(activity.getActivityHandle(), activity, DEFAULT_ACTIVITY_FLAGS);
}
// Set the listener
activity.setSessionListener(this);
// Put it into our activites map
activities.put(activity.getActivityHandle(), activity);
if (tracer.isInfoEnabled()) {
tracer.info("Activity started [" + activity.getActivityHandle() + "]");
}
} catch (Exception e) {
tracer.severe("Error creating activity", e);
throw new RuntimeException("Error creating activity", e);
}
}
use of org.mobicents.slee.resource.diameter.base.DiameterActivityImpl in project jain-slee.diameter by RestComm.
the class DiameterS6aResourceAdaptor method sessionCreated.
public void sessionCreated(Session session) {
DiameterMessageFactoryImpl sessionMsgFactory = new DiameterMessageFactoryImpl(session, stack, null, null);
DiameterActivityImpl activity = new DiameterActivityImpl(sessionMsgFactory, baseAvpFactory, session, this, null, null);
// TODO: Do we need to manage session?
// session.addStateChangeNotification(activity);
activity.setSessionListener(this);
addActivity(activity, false);
}
use of org.mobicents.slee.resource.diameter.base.DiameterActivityImpl in project jain-slee.diameter by RestComm.
the class DiameterRoResourceAdaptor method addActivity.
// Session Management --------------------------------------------------
/**
* Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map.
*
* @param ac the activity that has been created
*/
private void addActivity(DiameterActivity ac, boolean suspended) {
try {
// Inform SLEE that Activity Started
DiameterActivityImpl activity = (DiameterActivityImpl) ac;
if (suspended) {
sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS);
} else {
sleeEndpoint.startActivity(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS);
}
// Set the listener
activity.setSessionListener(this);
// Put it into our activities map
activities.put(activity.getActivityHandle(), activity);
if (tracer.isInfoEnabled()) {
tracer.info("Activity started [" + activity.getActivityHandle() + "]");
}
} catch (Exception e) {
tracer.severe("Error creating activity", e);
throw new RuntimeException("Error creating activity", e);
}
}
use of org.mobicents.slee.resource.diameter.base.DiameterActivityImpl in project jain-slee.diameter by RestComm.
the class DiameterS13ResourceAdaptor method addActivity.
// Session Management --------------------------------------------------
/**
* Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map.
*
* @param ac the activity that has been created
*/
private void addActivity(DiameterActivity ac, boolean suspended) {
try {
// Inform SLEE that Activity Started
DiameterActivityImpl activity = (DiameterActivityImpl) ac;
if (suspended) {
sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, DEFAULT_ACTIVITY_FLAGS);
} else {
sleeEndpoint.startActivity(activity.getActivityHandle(), activity, DEFAULT_ACTIVITY_FLAGS);
}
// Set the listener
activity.setSessionListener(this);
// Put it into our activites map
activities.put(activity.getActivityHandle(), activity);
if (tracer.isInfoEnabled()) {
tracer.info("Activity started [" + activity.getActivityHandle() + "]");
}
} catch (Exception e) {
tracer.severe("Error creating activity", e);
throw new RuntimeException("Error creating activity", e);
}
}
use of org.mobicents.slee.resource.diameter.base.DiameterActivityImpl in project jain-slee.diameter by RestComm.
the class DiameterRxResourceAdaptor method addActivity.
// Session Management --------------------------------------------------
/**
* Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map.
*
* @param ac the activity that has been created
*/
private void addActivity(final DiameterActivity ac, boolean suspended) {
try {
// Inform SLEE that Activity Started
final DiameterActivityImpl activity = (DiameterActivityImpl) ac;
if (suspended) {
sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS);
} else {
sleeEndpoint.startActivity(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS);
}
// Set the listener
activity.setSessionListener(this);
// Put it into our activities map
activities.put(activity.getActivityHandle(), activity);
if (tracer.isInfoEnabled()) {
tracer.info("Activity started [" + activity.getActivityHandle() + "]");
}
} catch (Exception e) {
tracer.severe("Error creating activity", e);
throw new RuntimeException("Error creating activity", e);
}
}
Aggregations