@Override public String getSessionId(String custom) { long id = uid.nextLong(); long high32 = (id & 0xffffffff00000000L) >> 32; long low32 = (id & 0xffffffffL); StringBuilder sb = new StringBuilder(); sb.append(stack.getMetaData().getLocalPeer().getUri().getFQDN()). append(";").append(high32).append(";").append(low32); if (custom != null) { //FIXME: add checks for not allowed chars? sb.append(";").append(custom); } return sb.toString(); }
private MutableConfiguration getMutableConfiguration() throws MBeanException { return (MutableConfiguration) stack.getMetaData().getConfiguration(); }
protected Peer createPeer(int rating, String uri, String ip, String portRange, MetaData metaData, Configuration config, Configuration peerConfig, IFsmFactory fsmFactory, ITransportLayerFactory transportFactory, IStatisticManager statisticFactory, IConcurrentFactory concurrentFactory, IMessageParser parser) throws InternalException, TransportException, URISyntaxException, UnknownServiceException { return new PeerImpl(this, rating, new URI(uri), ip, portRange, metaData.unwrap(IMetaData.class), config, peerConfig, fsmFactory, transportFactory, statisticFactory, concurrentFactory, parser, this.sessionDatasource); }
Peer sLocalPeer = stack.getMetaData().getLocalPeer(); MutableConfiguration config = (MutableConfiguration) stack.getMetaData().getConfiguration();
Peer sLocalPeer = stack.getMetaData().getLocalPeer(); MutableConfiguration config = (MutableConfiguration) stack.getMetaData().getConfiguration();
@Override public Long _LocalPeer_getVendorId() throws MBeanException { return this.stack.getMetaData().getLocalPeer().getVendorId(); }
private MutableConfiguration getMutableConfiguration() { return (MutableConfiguration) stack.getMetaData().getConfiguration(); }
private void startPeerManager() throws InternalException { try { if (peerManager != null) { peerManager.start(); } getMetaData().unwrap(IMetaData.class).updateLocalHostStateId(); } catch (Exception e) { throw new InternalException(e); } }
@Override public InetAddress[] _LocalPeer_getIPAddresses() throws MBeanException { return this.stack.getMetaData().getLocalPeer().getIPAddresses(); }
private MutableConfiguration getMutableConfiguration() throws MBeanException { return (MutableConfiguration) stack.getMetaData().getConfiguration(); }
@Override public Long _LocalPeer_getFirmware() throws MBeanException { return this.stack.getMetaData().getLocalPeer().getFirmware(); }
protected static MutableConfiguration getMutableConfiguration() { return (MutableConfiguration) stack.getMetaData().getConfiguration(); }
@Override public String _LocalPeer_getRealmName() throws MBeanException { return this.stack.getMetaData().getLocalPeer().getRealmName(); }
protected static MutableConfiguration getMutableConfiguration() { return (MutableConfiguration) stack.getMetaData().getConfiguration(); }
@Override public Set<ApplicationId> _LocalPeer_getCommonApplicationIds() throws MBeanException { return this.stack.getMetaData().getLocalPeer().getCommonApplications(); }
private EmptyConfiguration getPeerConfiguration(String name) { XMLConfiguration configuration = (XMLConfiguration) DiameterConfiguration.stack.getMetaData().getConfiguration(); Configuration[] peerTable = configuration.getChildren(PeerTable.ordinal()); for(Configuration curPeer : peerTable) { if(curPeer.getStringValue(PeerName.ordinal(), DEFAULT_STRING).equals(name)) { return (EmptyConfiguration) curPeer; } } return null; }
@Override public String _LocalPeer_getProductName() throws MBeanException { return this.stack.getMetaData().getLocalPeer().getProductName(); }
private EmptyConfiguration getPeerConfiguration(String name) { XMLConfiguration configuration = (XMLConfiguration) DiameterConfiguration.stack.getMetaData().getConfiguration(); Configuration[] peerTable = configuration.getChildren(PeerTable.ordinal()); for (Configuration curPeer : peerTable) { if (curPeer.getStringValue(PeerName.ordinal(), DEFAULT_STRING).equals(name)) { return (EmptyConfiguration) curPeer; } } return null; }
public String _LocalPeer_getRealmName() throws MBeanException { return this.stack.getMetaData().getLocalPeer().getRealmName(); }
/** * Initializes the RA Diameter Stack. * * @throws Exception */ private synchronized void initStack() throws Exception { // Register in the Mux as an app listener. this.diameterMux.registerListener(this, (ApplicationId[]) authApplicationIds.toArray(new ApplicationId[authApplicationIds.size()])); // Get the stack (should not mess with) this.stack = this.diameterMux.getStack(); this.messageTimeout = stack.getMetaData().getConfiguration().getLongValue(MessageTimeOut.ordinal(), (Long) MessageTimeOut.defValue()); if (tracer.isInfoEnabled()) { tracer.info("Diameter S6a RA :: Successfully initialized stack."); } }