public AccountingServerSessionActivity createAccountingServerActivity(Request req) throws CreateActivityException { ServerAccSession session = null; try { ApplicationId appId = req.getApplicationIdAvps().isEmpty() ? null : req.getApplicationIdAvps().iterator().next(); session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(req.getSessionId(), appId, ServerAccSession.class, req); if (session == null) { throw new CreateActivityException("Got NULL Session while creating Server Accounting Activity"); } sessionCreated(session); } catch (InternalException e) { throw new CreateActivityException("Internal exception while creating Server Accounting Activity", e); } catch (IllegalDiameterStateException e) { throw new CreateActivityException("Illegal Diameter State exception while creating Server Accounting Activity", e); } return (AccountingServerSessionActivity) activities.get(getActivityHandle(session.getSessions().get(0).getSessionId())); }
public AccountingServerSessionActivity createAccountingServerActivity(Request req) throws CreateActivityException { ServerAccSession session = null; try { ApplicationId appId = req.getApplicationIdAvps().isEmpty() ? null : req.getApplicationIdAvps().iterator().next(); session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(req.getSessionId(), appId, ServerAccSession.class, req); if (session == null) { throw new CreateActivityException("Got NULL Session while creating Server Accounting Activity"); } sessionCreated(session); } catch (InternalException e) { throw new CreateActivityException("Internal exception while creating Server Accounting Activity", e); } catch (IllegalDiameterStateException e) { throw new CreateActivityException("Illegal Diameter State exception while creating Server Accounting Activity", e); } return (AccountingServerSessionActivity) activities.get(getActivityHandle(session.getSessions().get(0).getSessionId())); }
private DiameterActivity createRfServerSessionActivity(Request request) throws CreateActivityException { ServerRfSession session = null; try { ApplicationId appId = request.getApplicationIdAvps().isEmpty() ? null : request.getApplicationIdAvps().iterator().next(); session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(request.getSessionId(), appId, ServerRfSession.class, request); if (session == null) { throw new CreateActivityException("Got NULL Session while creating Server Accounting Activity"); } sessionCreated(session); } catch (InternalException e) { throw new CreateActivityException("Internal exception while creating Server Accounting Activity", e); } catch (IllegalDiameterStateException e) { throw new CreateActivityException("Illegal Diameter State exception while creating Server Accounting Activity", e); } return (RfServerSessionActivityImpl) activities.get(getActivityHandle(session.getSessions().get(0).getSessionId())); }
protected DiameterActivity createActivity(Request request) throws CreateActivityException { try { List<ApplicationId> appIds = request.getApplicationIdAvps(); if(appIds == null || appIds.size() == 0) { throw new CreateActivityException("No App ids present in message"); } ISessionFactory fct = ((ISessionFactory) stack.getSessionFactory()); ServerCCASession session = fct.getNewAppSession(request.getSessionId(), ApplicationId.createByAuthAppId(CreditControlMessageFactory._CCA_VENDOR, CreditControlMessageFactory._CCA_AUTH_APP_ID), ServerCCASession.class, new Object[]{}); if (session == null) { tracer.severe("Failure creating CCA Server Session (null)."); return null; } sessionCreated(session); return (DiameterActivity) getActivity(getActivityHandle(session.getSessions().get(0).getSessionId())); } catch (Exception e) { throw new CreateActivityException(e); } }
String sessionId = request == null ? null : request.getSessionId(); ApplicationId appId = request.getApplicationIdAvps().isEmpty() ? null : request.getApplicationIdAvps().iterator().next();
String sessionId = request == null ? null : request.getSessionId(); ApplicationId appId = request.getApplicationIdAvps().isEmpty() ? null : request.getApplicationIdAvps().iterator().next();