本文整理了Java中org.jdiameter.api.Message.getSessionId()
方法的一些代码示例,展示了Message.getSessionId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getSessionId()
方法的具体详情如下:
包路径:org.jdiameter.api.Message
类名称:Message
方法名:getSessionId
[英]Return message Session Id avp Value (null if avp not set)
[中]返回消息会话Id avp值(如果未设置avp,则为空)
代码示例来源:origin: org.mobicents.diameter/jdiameter-impl
private String makeRoutingKey(Message message) {
String sessionId = message.getSessionId();
return new StringBuilder(sessionId != null ? sessionId : "null").append(message.getEndToEndIdentifier())
.append(message.getHopByHopIdentifier()).toString();
}
代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-s6a-ra
private DiameterActivity createActivity(Message message) throws CreateActivityException {
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
if (activity == null) {
if (message.isRequest()) {
switch(message.getCommandCode()) {
case UpdateLocationRequest.COMMAND_CODE:
case AuthenticationInformationRequest.COMMAND_CODE:
case PurgeUERequest.COMMAND_CODE:
case NotifyRequest.COMMAND_CODE:
return createS6aServerSessionActivity((Request) message);
case CancelLocationRequest.COMMAND_CODE:
case InsertSubscriberDataRequest.COMMAND_CODE:
case DeleteSubscriberDataRequest.COMMAND_CODE:
case ResetRequest.COMMAND_CODE:
return createS6aClientSessionActivity((Request) message);
}
}
else {
throw new IllegalStateException("Got answer, there should already be activity.");
}
}
return activity;
}
代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-cx-dx-ra
private DiameterActivity createActivity(Message message) throws CreateActivityException {
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
if(activity == null) {
if (message.isRequest()) {
if(message.getCommandCode() == PushProfileRequest.COMMAND_CODE || message.getCommandCode() == RegistrationTerminationRequest.COMMAND_CODE) {
return createCxDxClientSessionActivity((Request) message, false);
}
else {
return createCxDxServerSessionActivity((Request) message);
}
}
else {
throw new IllegalStateException("Got answer, there should already be activity.");
}
}
return activity;
}
代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-sh-client-ra
/**
* This method is for internal use only, it creates activities for requests that
* do not fall in certain app range or no activities were found <br>
* It should distinguish between initial requests, requests with different domains etc.
* Answer for creating XXXServerSession or basic diameter activity lies in this method
*
* @param message
* @return
*/
DiameterActivity createActivity(Message message) throws CreateActivityException {
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
if (activity == null) {
//FIXME: baranowb: here we can receive only (valid) PNR, other message are errors?
if(message.getCommandCode() != PushNotificationRequestImpl.commandCode) {
throw new CreateActivityException("Cant create activity for unexpected message:\r\n" + message);
}
return (ShClientSubscriptionActivityImpl) this.createShClientSubscriptionActivity(new PushNotificationRequestImpl( message));
}
return activity;
}
代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-base-ra
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
return this.createActivity(destinationHost, destinationRealm, message.getSessionId());
代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-base-ra
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
return this.createActivity(destinationHost, destinationRealm, message.getSessionId());
代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-ro-ra
private DiameterActivity createActivity(Message message) throws CreateActivityException {
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-ro-ra
private DiameterActivity createActivity(Message message) throws CreateActivityException {
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-gx-ra
private DiameterActivity createActivity(final Message message) throws CreateActivityException {
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
if (activity == null) {
if (message.isRequest()) {
return createGxServerSessionActivity((Request) message);
} else {
final AvpSet avps = message.getAvps();
Avp avp = null;
DiameterIdentity destinationHost = null;
DiameterIdentity destinationRealm = null;
if ((avp = avps.getAvp(Avp.DESTINATION_HOST)) != null) {
try {
destinationHost = new DiameterIdentity(avp.getDiameterIdentity());
} catch (AvpDataException e) {
tracer.severe("Failed to extract Destination-Host from Message.", e);
}
}
if ((avp = avps.getAvp(Avp.DESTINATION_REALM)) != null) {
try {
destinationRealm = new DiameterIdentity(avp.getDiameterIdentity());
} catch (AvpDataException e) {
tracer.severe("Failed to extract Destination-Realm from Message.", e);
}
}
return (DiameterActivity) createGxClientSessionActivity(destinationHost, destinationRealm);
}
}
return activity;
}
代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-rx-ra
private DiameterActivity createActivity(final Message message) throws CreateActivityException {
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
if (activity == null) {
if (message.isRequest()) {
代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-diameter-rf-ra
private DiameterActivity createActivity(Message message) throws CreateActivityException {
DiameterActivity activity = activities.get(getActivityHandle(message.getSessionId()));
代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-diameter-gq-ra
private DiameterActivity createActivity(Message message) throws CreateActivityException {
String sessionId = message.getSessionId();
DiameterActivityHandle handle = new DiameterActivityHandle(sessionId);
内容来源于网络,如有侵权,请联系作者删除!