@Override public SessionFactory getSessionFactory() throws IllegalDiameterStateException { return this.realStack.getSessionFactory(); }
public SessionFactory getSessionFactory() throws IllegalDiameterStateException { return this.realStack.getSessionFactory(); }
protected Message createRawMessage(int commandCode) { try { return stack.getSessionFactory().getNewRawSession().createMessage(commandCode, gqAppId); } catch (IllegalDiameterStateException e) { logger.error("Failed to get session factory for message creation.", e); } catch (InternalException e) { logger.error("Failed to create new raw session for message creation.", e); } return null; }
public RawSession getNewRawSession() throws InternalException { try { return stack.getSessionFactory().getNewRawSession(); } catch ( IllegalDiameterStateException e ) { tracer.severe( "Failure while obtaining Session Factory for new Raw Session.", e ); return null; } }
public RawSession getNewRawSession() throws InternalException { try { return stack.getSessionFactory().getNewRawSession(); } catch ( IllegalDiameterStateException e ) { tracer.severe( "Failure while obtaining Session Factory for new Raw Session.", e ); return null; } }
public Message createMessage(boolean isRequest, int commandCode, long applicationId) { try { Message message = this.stack.getSessionFactory().getNewRawSession().createMessage(commandCode, org.jdiameter.api.ApplicationId.createByAccAppId(applicationId), new Avp[]{}); message.setRequest(isRequest); return message; } catch (Exception e) { logger.error("Failure while creating message.", e); } return null; }
public Message createMessage(boolean isRequest, int commandCode, long applicationId) { try { Message message = this.stack.getSessionFactory().getNewRawSession().createMessage(commandCode, org.jdiameter.api.ApplicationId.createByAccAppId(applicationId), new Avp[]{}); message.setRequest(isRequest); return message; } catch (Exception e) { logger.error("Failure while creating message.", e); } return null; }
@Override public Message createMessage(boolean isRequest, int commandCode, long applicationId) { try { Message message = this.stack.getSessionFactory().getNewRawSession(). createMessage(commandCode, org.jdiameter.api.ApplicationId.createByAccAppId(applicationId), new Avp[]{}); message.setRequest(isRequest); return message; } catch (Exception e) { logger.error("Failure while creating message.", e); } return null; }
public RfClientSessionActivity createRfClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException { try { ClientRfSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, acctApplicationIds.get(0), ClientRfSession.class); if (session == null) { throw new CreateActivityException("Got NULL Session while creating Client Accounting Activity"); } sessionCreated(session); return new RfClientSessionActivityImpl(rfMessageFactory, rfAvpFactory, session, destinationHost, destinationRealm, stack); } catch (Exception e) { throw new CreateActivityException("Internal exception while creating Client Accounting Activity", e); } }
public CxDxServerSessionActivity createCxDxServerSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException { try { ServerCxDxSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, ApplicationId.createByAuthAppId(DiameterCxDxAvpCodes.CXDX_VENDOR_ID, DiameterCxDxAvpCodes.CXDX_AUTH_APP_ID), ServerCxDxSession.class); CxDxServerSessionImpl activity = new CxDxServerSessionImpl(ra.cxdxMessageFactory, ra.cxdxAvpFactory, session, (EventListener<Request, Answer>) session, destinationHost, destinationRealm, stack); addActivity(activity, false); return activity; } catch (Exception e) { throw new CreateActivityException("Internal exception while creating Client Accounting Activity", e); } }
public S6aServerSessionActivity createS6aServerSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException { try { ServerS6aSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, ApplicationId.createByAuthAppId(10415L, 16777251L), ServerS6aSession.class); S6aServerSessionImpl activity = new S6aServerSessionImpl(ra.s6aMessageFactory, ra.s6aAvpFactory, session, (EventListener<Request, Answer>) session, destinationHost, destinationRealm, stack); addActivity(activity, false); return activity; } catch (Exception e) { throw new CreateActivityException("Internal exception while creating S6a Server Activity", e); } }
public S6aClientSessionActivity createS6aClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException { try { ClientS6aSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, ApplicationId.createByAuthAppId(10415L, 16777251L), ClientS6aSession.class); S6aClientSessionImpl activity = new S6aClientSessionImpl(ra.s6aMessageFactory, ra.s6aAvpFactory, session, (EventListener<Request, Answer>) session, destinationHost, destinationRealm, stack); addActivity(activity, false); return activity; } catch (Exception e) { throw new CreateActivityException("Internal exception while creating S6a Client Activity", e); } }
public AuthClientSessionActivity createAuthenticationClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException { try { ClientAuthSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, authApplicationIds.get(0), ClientAuthSession.class); sessionCreated(session); return (AuthClientSessionActivity) activities.get(getActivityHandle(session.getSessions().get(0).getSessionId())); } catch (InternalException e) { throw new CreateActivityException("Internal exception while creating Authentication Activity", e); } catch (IllegalDiameterStateException e) { throw new CreateActivityException("Illegal Diameter State exception while creating Authentication Activity", e); } }
public AuthClientSessionActivity createAuthenticationClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException { try { ClientAuthSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, authApplicationIds.get(0), ClientAuthSession.class); sessionCreated(session); return (AuthClientSessionActivity) activities.get(getActivityHandle(session.getSessions().get(0).getSessionId())); } catch (InternalException e) { throw new CreateActivityException("Internal exception while creating Authentication Activity", e); } catch (IllegalDiameterStateException e) { throw new CreateActivityException("Illegal Diameter State exception while creating Authentication Activity", e); } }
public AuthServerSessionActivity createAuthenticationServerActivity(Request request) throws CreateActivityException { ServerAuthSession session = null; try { session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, authApplicationIds.get(0), ServerAuthSession.class, new Object[]{request}); sessionCreated(session); return (AuthServerSessionActivity) activities.get(getActivityHandle(session.getSessions().get(0).getSessionId())); } catch (InternalException e) { throw new CreateActivityException("Internal exception while creating Server Authentication Activity", e); } catch (IllegalDiameterStateException e) { throw new CreateActivityException("Illegal Diameter State exception while creating Server Authentication Activity", e); } }
public RoClientSessionActivity createRoClientSessionActivity() throws CreateActivityException { try { ClientRoSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, authApplicationIds.get(0), ClientRoSession.class, new Object[]{}); sessionCreated(session); if (session == null) { tracer.severe("Failure creating Ro Client Session (null)."); return null; } return (RoClientSessionActivity) getActivity(getActivityHandle(session.getSessions().get(0).getSessionId())); } catch (Exception e) { throw new CreateActivityException(e); } }
public AuthServerSessionActivity createAuthenticationServerActivity(Request request) throws CreateActivityException { ServerAuthSession session = null; try { session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, authApplicationIds.get(0), ServerAuthSession.class, new Object[]{request}); sessionCreated(session); return (AuthServerSessionActivity) activities.get(getActivityHandle(session.getSessions().get(0).getSessionId())); } catch (InternalException e) { throw new CreateActivityException("Internal exception while creating Server Authentication Activity", e); } catch (IllegalDiameterStateException e) { throw new CreateActivityException("Illegal Diameter State exception while creating Server Authentication Activity", e); } }
public AccountingClientSessionActivity createAccountingClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException { try { // FIXME: alexandre: This must be fixed, we need way to specify Application-Id! ClientAccSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, acctApplicationIds.get(0), ClientAccSession.class); sessionCreated(session); return (AccountingClientSessionActivity) activities.get(getActivityHandle(session.getSessions().get(0).getSessionId())); } catch (InternalException e) { throw new CreateActivityException("Internal exception while creating Client Accounting Activity", e); } catch (IllegalDiameterStateException e) { throw new CreateActivityException("Illegal Diameter State exception while creating Client Accounting Activity", e); } }
public GxClientSessionActivity createGxClientSessionActivity() throws CreateActivityException { try { final ClientGxSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(null, authApplicationIds.get(0), ClientGxSession.class, new Object[]{}); sessionCreated(session); if (session == null) { tracer.severe("Failure creating Gx Client Session (null)."); return null; } return (GxClientSessionActivity) getActivity(getActivityHandle(session.getSessions().get(0).getSessionId())); } catch (Exception e) { throw new CreateActivityException(e); } }
private DiameterActivity createRoServerSessionActivity(Request message) throws CreateActivityException { try { ServerRoSession session = ((ISessionFactory) stack.getSessionFactory()).getNewAppSession(message.getSessionId(), authApplicationIds.get(0), ServerRoSession.class, new Object[]{}); sessionCreated(session); if (session == null) { tracer.severe("Failure creating Ro Server Session (null)."); return null; } return (DiameterActivity) getActivity(getActivityHandle(session.getSessions().get(0).getSessionId())); } catch (Exception e) { throw new CreateActivityException(e); } }