use of javax.slee.resource.FireableEventType in project jain-slee.diameter by RestComm.
the class DiameterRxResourceAdaptor method fireEvent.
/**
* {@inheritDoc}
*/
@Override
public void fireEvent(final String sessionId, final Message message) {
final DiameterMessage event = (DiameterMessage) createEvent(message);
final FireableEventType eventId = eventIdCache.getEventId(eventLookup, message);
this.fireEvent(event, getActivityHandle(sessionId), eventId, null, true, message.isRequest());
}
use of javax.slee.resource.FireableEventType in project jain-slee.diameter by RestComm.
the class EventIDCache method getEventId.
/**
* @param eventLookupFacility
* @param message
* @return
*/
public FireableEventType getEventId(final EventLookupFacility eventLookupFacility, final Message message) {
FireableEventType eventID;
// Error is always the same.
if (message.isError()) {
eventID = getEventId(eventLookupFacility, ERROR_ANSWER);
} else {
final int commandCode = message.getCommandCode();
final boolean isRequest = message.isRequest();
final String eventName = eventNames.get(commandCode);
if (eventName != null) {
eventID = getEventId(eventLookupFacility, eventName + (isRequest ? "Request" : "Answer"));
} else {
eventID = getEventId(eventLookupFacility, EXTENSION_DIAMETER_MESSAGE);
}
}
return eventID;
}
use of javax.slee.resource.FireableEventType in project jain-slee.diameter by RestComm.
the class EventIDCache method getEventId.
/**
* @param eventLookupFacility
* @param message
* @return
*/
public FireableEventType getEventId(EventLookupFacility eventLookupFacility, Message message) {
FireableEventType eventID = null;
// Error is always the same.
if (message.isError()) {
// eventID = getEventId(eventLookupFacility, ERROR_ANSWER);
// TODO: x?
} else {
final int commandCode = message.getCommandCode();
final boolean isRequest = message.isRequest();
String eventName = eventNames.get(commandCode);
if (eventName != null) {
eventID = getEventId(eventLookupFacility, eventName + (isRequest ? "Request" : "Answer"));
}
}
return eventID;
}
use of javax.slee.resource.FireableEventType in project jain-slee.diameter by RestComm.
the class DiameterS13ResourceAdaptor method fireEvent.
/*
* (non-Javadoc)
* @see org.mobicents.slee.resource.diameter.base.handlers.BaseSessionCreationListener#fireEvent(java.lang.String, org.jdiameter.api.Request, org.jdiameter.api.Answer)
*/
public void fireEvent(String sessionId, Message message) {
DiameterMessage event = (DiameterMessage) createEvent(message);
FireableEventType eventId = eventIdCache.getEventId(eventLookup, message);
this.fireEvent(event, getActivityHandle(sessionId), eventId, null, true, message.isRequest());
}
use of javax.slee.resource.FireableEventType in project jain-slee.diameter by RestComm.
the class DiameterS6aResourceAdaptor method fireEvent.
/*
* (non-Javadoc)
* @see org.mobicents.slee.resource.diameter.base.handlers.BaseSessionCreationListener#fireEvent(java.lang.String, org.jdiameter.api.Request, org.jdiameter.api.Answer)
*/
public void fireEvent(String sessionId, Message message) {
DiameterMessage event = (DiameterMessage) createEvent(message);
FireableEventType eventId = eventIdCache.getEventId(eventLookup, message);
this.fireEvent(event, getActivityHandle(sessionId), eventId, null, true, message.isRequest());
}
Aggregations