use of org.jdiameter.server.impl.app.s6a.S6aServerSessionImpl in project jain-slee.diameter by RestComm.
the class S6aSessionFactory method getNewSession.
/* (non-Javadoc)
* @see org.jdiameter.common.api.app.IAppSessionFactory#getNewSession(java.lang.String, java.lang.Class, org.jdiameter.api.ApplicationId, java.lang.Object[])
*/
@Override
public AppSession getNewSession(String sessionId, Class<? extends AppSession> appSessionClass, ApplicationId applicationId, Object[] args) {
AppSession appSession = null;
if (appSessionClass == ServerS6aSession.class) {
S6aServerSessionImpl serverSession = null;
serverSession = (S6aServerSessionImpl) super.getNewSession(sessionId, appSessionClass, applicationId, args);
appSession = serverSession;
} else if (appSessionClass == ClientS6aSession.class) {
S6aClientSessionImpl clientSession = null;
clientSession = (S6aClientSessionImpl) super.getNewSession(sessionId, appSessionClass, applicationId, args);
appSession = clientSession;
} else {
throw new IllegalArgumentException("Wrong session class: [" + appSessionClass + "]. Supported[" + ServerS6aSession.class + "," + ClientS6aSession.class + "]");
}
return appSession;
}
Aggregations