@Override public MetaData getMetaData() { return this.realStack.getMetaData(); }
@Override public SessionFactory getSessionFactory() throws IllegalDiameterStateException { return this.realStack.getSessionFactory(); }
@Override public <T> T unwrap( Class<T> iface ) throws InternalException { return this.realStack.unwrap( iface ); }
if (activity.getClass().equals(DiameterActivityImpl.class)) { session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return; ClientCCASession appSession = this.diameterStack.getSession(activity.getSessionId(), ClientCCASession.class); session = appSession.getSessions().get(0); performBeforeReturnOnBase(activity, session); ServerCCASession appSession = this.diameterStack.getSession(activity.getSessionId(), ServerCCASession.class); session = appSession.getSessions().get(0); performBeforeReturnOnBase(activity, session);
/** * Initializes the RA Diameter Stack. * * @throws Exception */ private synchronized void initStack() throws Exception { // Register in the Mux as app listener. List<ApplicationId> allAppIds = new ArrayList<ApplicationId>(); allAppIds.addAll(authApplicationIds); allAppIds.addAll(acctApplicationIds); this.diameterMux.registerListener( this, allAppIds.toArray(new ApplicationId[allAppIds.size()])); // Get the stack (should not mess with) this.stack = this.diameterMux.getStack(); this.messageTimeout = stack.getMetaData().getConfiguration().getLongValue(MessageTimeOut.ordinal(), (Long) MessageTimeOut.defValue()); // Obtain parser and store it in AvpUtilities MessageParser parser = ((IContainer)stack).getAssemblerFacility().getComponentInstance(MessageParser.class); AvpUtilities.setParser(parser); AvpUtilities.setDictionary(stack.getDictionary()); if(tracer.isInfoEnabled()) { tracer.info("Diameter Base RA :: Successfully initialized stack."); } } private void initActivitiesMgmt() {
@Override public <T extends BaseSession> T getSession(String sessionId, Class<T> clazz) throws InternalException { return this.realStack.getSession(sessionId, clazz); }
@Override public Dictionary getDictionary() throws IllegalDiameterStateException { return realStack.getDictionary(); }
session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return; ClientShSession appSession = this.diameterStack.getSession(activity.getSessionId(), ClientShSession.class); session = appSession.getSessions().get(0); performBeforeReturnOnBase(activity, session); ClientShSession appSession = this.diameterStack.getSession(activity.getSessionId(), ClientShSession.class); session = appSession.getSessions().get(0); performBeforeReturnOnBase(activity, session);
/** * Initializes the RA Diameter Stack. * * @throws Exception */ private synchronized void initStack() throws Exception { // Register in the Mux as app listener. List<ApplicationId> allAppIds = new ArrayList<ApplicationId>(); allAppIds.addAll(authApplicationIds); allAppIds.addAll(acctApplicationIds); this.diameterMux.registerListener( this, allAppIds.toArray(new ApplicationId[allAppIds.size()])); // Get the stack (should not mess with) this.stack = this.diameterMux.getStack(); this.messageTimeout = stack.getMetaData().getConfiguration().getLongValue(MessageTimeOut.ordinal(), (Long) MessageTimeOut.defValue()); // Obtain parser and store it in AvpUtilities MessageParser parser = ((IContainer)stack).getAssemblerFacility().getComponentInstance(MessageParser.class); AvpUtilities.setParser(parser); AvpUtilities.setDictionary(stack.getDictionary()); if(tracer.isInfoEnabled()) { tracer.info("Diameter Base RA :: Successfully initialized stack."); } } private void initActivitiesMgmt() {
public <T extends BaseSession> T getSession(String sessionId, Class<T> clazz) throws InternalException { return this.realStack.getSession(sessionId, clazz); }
public Dictionary getDictionary() throws IllegalDiameterStateException { return realStack.getDictionary(); }
session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return; ServerRfSession appSession = this.diameterStack.getSession(activity.getSessionId(), ServerRfSession.class); session = appSession.getSessions().get(0); performBeforeReturnOnBase(activity, session); ClientRfSession appSession = this.diameterStack.getSession(activity.getSessionId(), ClientRfSession.class); session = appSession.getSessions().get(0); performBeforeReturnOnBase(activity, session);
private MutableConfiguration getMutableConfiguration() throws MBeanException { return (MutableConfiguration) stack.getMetaData().getConfiguration(); }
public SessionFactory getSessionFactory() throws IllegalDiameterStateException { return this.realStack.getSessionFactory(); }
public void _Network_Realms_addPeerToRealm(String realmName, String peerName, boolean attemptConnect) { try { NetworkImpl n = (NetworkImpl) stack.unwrap(Network.class); /*Peer p =*/ n.addPeer(peerName, realmName, attemptConnect); } catch (IllegalArgumentException e) { logger.warn(e.getMessage()); } catch (InternalException e) { throw new RuntimeException("Failed to add peer with name '" + peerName + "' to realm '" + realmName + "'", e); } }
if (activity.getClass().equals(DiameterActivityImpl.class)) { session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return; ClientAccSession appSession = this.diameterStack.getSession(activity.getSessionId(), ClientAccSession.class); ServerAccSession appSession = this.diameterStack.getSession(activity.getSessionId(), ServerAccSession.class); session = appSession.getSessions().get(0); performBeforeReturnOnBase(activity, session); ClientAuthSession appSession = this.diameterStack.getSession(activity.getSessionId(), ClientAuthSession.class); ServerAuthSession appSession = this.diameterStack.getSession(activity.getSessionId(), ServerAuthSession.class);
@Override public Long _LocalPeer_getFirmware() throws MBeanException { return this.stack.getMetaData().getLocalPeer().getFirmware(); }
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 void _Network_Realms_removeRealm(String name) { try { org.jdiameter.server.impl.NetworkImpl n = (org.jdiameter.server.impl.NetworkImpl) stack.unwrap(org.jdiameter.api.Network.class); n.remRealm(name); } catch (InternalException e) { throw new RuntimeException("Failed to remove realm '" + name + "'.", e); } }
if (activity.getClass().equals(DiameterActivityImpl.class)) { session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return; ClientAccSession appSession = this.diameterStack.getSession(activity.getSessionId(), ClientAccSession.class); ServerAccSession appSession = this.diameterStack.getSession(activity.getSessionId(), ServerAccSession.class); session = appSession.getSessions().get(0); performBeforeReturnOnBase(activity, session); ClientAuthSession appSession = this.diameterStack.getSession(activity.getSessionId(), ClientAuthSession.class); ServerAuthSession appSession = this.diameterStack.getSession(activity.getSessionId(), ServerAuthSession.class);