org.jdiameter.api.MetaData类的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(166)

本文整理了Java中org.jdiameter.api.MetaData类的一些代码示例,展示了MetaData类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetaData类的具体详情如下:
包路径:org.jdiameter.api.MetaData
类名称:MetaData

MetaData介绍

[英]This interface is implemented by sack vendors to let users know the local properties of a Diameter Stack implementation and current instance.
[中]这个接口由sack供应商实现,让用户知道Diameter堆栈实现和当前实例的本地属性。

代码示例

代码示例来源:origin: org.mobicents.diameter/jdiameter-impl

@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();
}

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

private MutableConfiguration getMutableConfiguration() throws MBeanException {
 return (MutableConfiguration) stack.getMetaData().getConfiguration();
}

代码示例来源:origin: org.mobicents.diameter/jdiameter-impl

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);
}

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

Peer sLocalPeer = stack.getMetaData().getLocalPeer();
MutableConfiguration config = (MutableConfiguration) stack.getMetaData().getConfiguration();

代码示例来源:origin: org.mobicents.diameter/mobicents-diameter-mux-jar

Peer sLocalPeer = stack.getMetaData().getLocalPeer();
MutableConfiguration config = (MutableConfiguration) stack.getMetaData().getConfiguration();

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

@Override
public Long _LocalPeer_getVendorId() throws MBeanException {
 return this.stack.getMetaData().getLocalPeer().getVendorId();
}

代码示例来源:origin: org.mobicents.diameter/mobicents-diameter-mux-jar

private MutableConfiguration getMutableConfiguration() {
 return (MutableConfiguration) stack.getMetaData().getConfiguration();
}

代码示例来源:origin: org.mobicents.diameter/jdiameter-impl

private void startPeerManager() throws InternalException {
 try {
  if (peerManager != null) {
   peerManager.start();
  }
  getMetaData().unwrap(IMetaData.class).updateLocalHostStateId();
 }
 catch (Exception e) {
  throw new InternalException(e);
 }
}

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

@Override
public InetAddress[] _LocalPeer_getIPAddresses() throws MBeanException {
 return this.stack.getMetaData().getLocalPeer().getIPAddresses();
}

代码示例来源:origin: org.mobicents.diameter/mobicents-diameter-mux-jar

private MutableConfiguration getMutableConfiguration() throws MBeanException {
 return (MutableConfiguration) stack.getMetaData().getConfiguration();
}

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

@Override
public Long _LocalPeer_getFirmware() throws MBeanException {
 return this.stack.getMetaData().getLocalPeer().getFirmware();
}

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

protected static MutableConfiguration getMutableConfiguration() {
 return (MutableConfiguration) stack.getMetaData().getConfiguration();
}

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

@Override
public String _LocalPeer_getRealmName() throws MBeanException {
 return this.stack.getMetaData().getLocalPeer().getRealmName();
}

代码示例来源:origin: org.mobicents.diameter/mobicents-diameter-mux-jar

protected static MutableConfiguration getMutableConfiguration() {
 return (MutableConfiguration) stack.getMetaData().getConfiguration();
}

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

@Override
public Set<ApplicationId> _LocalPeer_getCommonApplicationIds() throws MBeanException {
 return this.stack.getMetaData().getLocalPeer().getCommonApplications();
}

代码示例来源:origin: org.mobicents.diameter/mobicents-diameter-mux-jar

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;
}

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

@Override
public String _LocalPeer_getProductName() throws MBeanException {
 return this.stack.getMetaData().getLocalPeer().getProductName();
}

代码示例来源:origin: org.mobicents.diameter/restcomm-diameter-mux-jar

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;
}

代码示例来源:origin: org.mobicents.diameter/mobicents-diameter-mux-jar

public String _LocalPeer_getRealmName() throws MBeanException {
 return this.stack.getMetaData().getLocalPeer().getRealmName();
}

代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-s6a-ra

/**
 * 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.");
 }
}

相关文章