Search in sources :

Example 1 with CreditControlMessageFactory

use of net.java.slee.resource.diameter.cca.CreditControlMessageFactory in project jain-slee.diameter by RestComm.

the class DiameterCCAResourceAdaptor method sessionCreated.

// CCA Session Creation Listener --------------------------------------
private void sessionCreated(ClientCCASession ccClientSession) {
    // Make sure it's a new session and there's no activity created yet.
    if (this.getActivity(getActivityHandle(ccClientSession.getSessions().get(0).getSessionId())) != null) {
        tracer.warning("Activity found for created Credit-Control Client Session. Shouldn't exist. Aborting.");
        return;
    }
    // Get Message Factories (for Base and CCA)
    DiameterMessageFactoryImpl baseMsgFactory = new DiameterMessageFactoryImpl(ccClientSession.getSessions().get(0), this.stack);
    CreditControlMessageFactory ccaMsgFactory = new CreditControlMessageFactoryImpl(baseMsgFactory, ccClientSession.getSessions().get(0), this.stack, this.ccaAvpFactory);
    // Create Client Activity
    CreditControlClientSessionImpl activity = new CreditControlClientSessionImpl(ccaMsgFactory, this.ccaAvpFactory, ccClientSession, null, null);
    // session.addStateChangeNotification(activity);
    activity.setSessionListener(this);
    activityCreated(activity, false);
}
Also used : DiameterMessageFactoryImpl(org.mobicents.slee.resource.diameter.base.DiameterMessageFactoryImpl) CreditControlMessageFactory(net.java.slee.resource.diameter.cca.CreditControlMessageFactory)

Example 2 with CreditControlMessageFactory

use of net.java.slee.resource.diameter.cca.CreditControlMessageFactory in project jain-slee.diameter by RestComm.

the class DiameterCCAResourceAdaptor method sessionCreated.

private void sessionCreated(ServerCCASession ccServerSession) {
    // Make sure it's a new session and there's no activity created yet.
    if (this.getActivity(getActivityHandle(ccServerSession.getSessions().get(0).getSessionId())) != null) {
        tracer.warning("Activity found for created Credit-Control Server Session. Shouldn't exist. Aborting.");
        return;
    }
    // Get Message Factories (for Base and CCA)
    DiameterMessageFactoryImpl baseMsgFactory = new DiameterMessageFactoryImpl(ccServerSession.getSessions().get(0), this.stack);
    CreditControlMessageFactory ccaMsgFactory = new CreditControlMessageFactoryImpl(baseMsgFactory, ccServerSession.getSessions().get(0), this.stack, this.ccaAvpFactory);
    // Create Server Activity
    CreditControlServerSessionImpl activity = new CreditControlServerSessionImpl(ccaMsgFactory, this.ccaAvpFactory, ccServerSession, null, null);
    activity.setSessionListener(this);
    activityCreated(activity, false);
}
Also used : DiameterMessageFactoryImpl(org.mobicents.slee.resource.diameter.base.DiameterMessageFactoryImpl) CreditControlMessageFactory(net.java.slee.resource.diameter.cca.CreditControlMessageFactory)

Aggregations

CreditControlMessageFactory (net.java.slee.resource.diameter.cca.CreditControlMessageFactory)2 DiameterMessageFactoryImpl (org.mobicents.slee.resource.diameter.base.DiameterMessageFactoryImpl)2