use of org.jdiameter.server.impl.app.s13.S13ServerSessionImpl in project jain-slee.diameter by RestComm.
the class S13SessionFactory 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 == ServerS13Session.class) {
S13ServerSessionImpl serverSession = null;
serverSession = (S13ServerSessionImpl) super.getNewSession(sessionId, appSessionClass, applicationId, args);
appSession = serverSession;
} else if (appSessionClass == ClientS13Session.class) {
S13ClientSessionImpl clientSession = null;
clientSession = (S13ClientSessionImpl) super.getNewSession(sessionId, appSessionClass, applicationId, args);
appSession = clientSession;
} else {
throw new IllegalArgumentException("Wrong session class: [" + appSessionClass + "]. Supported[" + ServerS13Session.class + "," + ClientS13Session.class + "]");
}
return appSession;
}
Aggregations