public Session getNewSession(String sessionId) throws InternalException { Session session = sessionFactory.getNewSession(sessionId); sessionCreated(session); return session; }
public Session getNewSession(String sessionId) throws InternalException { Session session = sessionFactory.getNewSession(sessionId); sessionCreated(session); return session; }
public Session getNewSession() throws InternalException { Session session = sessionFactory.getNewSession(); sessionCreated(session); return session; }
public Session getNewSession() throws InternalException { Session session = sessionFactory.getNewSession(); sessionCreated(session); return session; }
public net.java.slee.resource.diameter.sh.events.ProfileUpdateAnswer profileUpdateRequest(ProfileUpdateRequest message) throws IOException { // This is sync, we dont care about activities or FSM, someone else should care... if (message == null) { throw new IOException("Cant send null message"); } try { String sessionID = message.getSessionId(); if (sessionID == null) { throw new IllegalArgumentException("Session Id must not be null."); } Session session = stack.getSessionFactory().getNewSession(sessionID); Future<Message> f = session.send(((DiameterMessageImpl) message).getGenericData()); return new ProfileUpdateAnswerImpl(f.get()); } catch (AvpNotAllowedException e) { throw e; } catch (Exception e) { throw new IOException("Failed to send due to: " + e.getLocalizedMessage()); } }
/** * * @param destinationHost * @param destinationRealm * @param sessionId * @return * @throws CreateActivityException */ public DiameterActivity createActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm, String sessionId) throws CreateActivityException { try { Session session = sessionId != null ? proxySessionFactory.getNewSession(sessionId) : proxySessionFactory.getNewSession(); sessionCreated(session); return activities.get(getActivityHandle(session.getSessionId())); } catch (InternalException e) { throw new CreateActivityException("Failure obtaining session for creating activity.", e); } }
@Override public Message sendMessageSync(Message message) { try { Avp sessionId = null; Session session = null; if ((sessionId = message.getAvps().getAvp(Avp.SESSION_ID)) == null) { session = stack.getSessionFactory().getNewSession(); } else { session = stack.getSessionFactory().getNewSession(sessionId.getUTF8String()); } Future<Message> answer = session.send(message); return answer.get(); } catch (Exception e) { logger.error("", e); } return null; }
public Message sendMessageSync(Message message) { try { Avp sessionId = null; Session session = null; if((sessionId = message.getAvps().getAvp(Avp.SESSION_ID)) == null) { session = stack.getSessionFactory().getNewSession(); } else { session = stack.getSessionFactory().getNewSession(sessionId.getUTF8String()); } Future<Message> answer = session.send(message); return answer.get(); } catch (Exception e) { logger.error("", e); } return null; }
public Message sendMessageSync(Message message) { try { Avp sessionId = null; Session session = null; if((sessionId = message.getAvps().getAvp(Avp.SESSION_ID)) == null) { session = stack.getSessionFactory().getNewSession(); } else { session = stack.getSessionFactory().getNewSession(sessionId.getUTF8String()); } Future<Message> answer = session.send(message); return answer.get(); } catch (Exception e) { logger.error("", e); } return null; }
public UserDataAnswer userDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest message) throws IOException { // This is sync, we dont care about activities or FSM, someone else should care... if (message == null) { throw new IOException("Cant send null message"); } try { String sessionID = message.getSessionId(); if (sessionID == null) { throw new IllegalArgumentException("Session Id must not be null."); } Session session = stack.getSessionFactory().getNewSession(sessionID); Future<Message> f = session.send(((DiameterMessageImpl) message).getGenericData()); return new UserDataAnswerImpl(f.get()); } catch (AvpNotAllowedException e) { throw e; } catch (Exception e) { throw new IOException("Failed to send due to: " + e.getLocalizedMessage()); } }
/** * * @param destinationHost * @param destinationRealm * @param sessionId * @return * @throws CreateActivityException */ public DiameterActivity createActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm, String sessionId) throws CreateActivityException { try { Session session = sessionId != null ? proxySessionFactory.getNewSession(sessionId) : proxySessionFactory.getNewSession(); sessionCreated(session); return activities.get(getActivityHandle(session.getSessionId())); } catch (InternalException e) { throw new CreateActivityException("Failure obtaining session for creating activity.", e); } }
public SubscribeNotificationsAnswer subscribeNotificationsRequest(net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest message) throws IOException { // This is sync, we dont care about activities or FSM, someone else should care... if (message == null) { throw new IOException("Cant send null message"); } try { String sessionID = message.getSessionId(); if (sessionID == null) { throw new IllegalArgumentException("Session Id must not be null."); } Session session = stack.getSessionFactory().getNewSession(sessionID); Future<Message> f = session.send(((DiameterMessageImpl) message).getGenericData()); return new SubscribeNotificationsAnswerImpl(f.get()); } catch (AvpNotAllowedException e) { throw e; } catch (Exception e) { throw new IOException("Failed to send due to: " + e); } }
public String sendMessage(Message message) { try { Avp sessionId = null; Session session = null; if((sessionId = message.getAvps().getAvp(Avp.SESSION_ID)) == null) { session = stack.getSessionFactory().getNewSession(); } else { session = stack.getSessionFactory().getNewSession(sessionId.getUTF8String()); } session.send(message); return session.getSessionId(); } catch (Exception e) { logger.error("", e); } return null; }
@Override public String sendMessage(Message message) { try { Avp sessionId = null; Session session = null; if ((sessionId = message.getAvps().getAvp(Avp.SESSION_ID)) == null) { session = stack.getSessionFactory().getNewSession(); } else { session = stack.getSessionFactory().getNewSession(sessionId.getUTF8String()); } session.send(message); return session.getSessionId(); } catch (Exception e) { logger.error("", e); } return null; }
public String sendMessage(Message message) { try { Avp sessionId = null; Session session = null; if((sessionId = message.getAvps().getAvp(Avp.SESSION_ID)) == null) { session = stack.getSessionFactory().getNewSession(); } else { session = stack.getSessionFactory().getNewSession(sessionId.getUTF8String()); } session.send(message); return session.getSessionId(); } catch (Exception e) { logger.error("", e); } return null; }
if (activity.getClass().equals(DiameterActivityImpl.class)) { session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return;
session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return;
session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return;
Session session = null; if (activity.getClass().equals(DiameterActivityImpl.class)) { session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return;
Session session = null; if (activity.getClass().equals(DiameterActivityImpl.class)) { session = this.diameterStack.getSessionFactory().getNewSession(activity.getSessionId()); performBeforeReturnOnBase(activity, session); return;