Examples of SessionScope


Examples of org.cipango.server.session.SessionManager.SessionScope

       
        public SipApplicationSession createApplicationSession()
        {
          Server server = getServer();
         
          SessionScope scope = server.getSessionManager().openScope(ID.newCallId());
          try
          {
            AppSession session = scope.getCallSession().createAppSession(SipAppContext.this, ID.newAppSessionId());
            return new ScopedAppSession(session);
          }
          finally
          {
            scope.close();
          }
        }
View Full Code Here

Examples of org.cipango.server.session.SessionManager.SessionScope

      if (key == null)
        throw new NullPointerException("key is null");
     
      String id = ID.getIdFromKey(getName(), key);

      SessionScope tx = getServer().getSessionManager().openScope(id);
      try
      {
        AppSession appSession = tx.getCallSession().getAppSession(id);
        if (appSession == null)
        {
          if (create)
            appSession = tx.getCallSession().createAppSession(SipAppContext.this, id);
          else
            return null;
        }
        return new ScopedAppSession(appSession);
      }
      finally
      {
        tx.close();
      }     
    }
View Full Code Here

Examples of org.cipango.server.session.SessionManager.SessionScope

    return timers;
  }

  public void invalidate()
  {
    SessionScope scope = openScope();
    try
    {
      _appSession.invalidate();
    }
    finally
    {
      scope.close();
    }
  }
View Full Code Here

Examples of org.cipango.server.session.SessionManager.SessionScope

    return _appSession.isValid();
  }

  public void removeAttribute(String name)
  {
    SessionScope scope = openScope();
    try
    {
      _appSession.removeAttribute(name);
    }
    finally
    {
      scope.close();
    }
  }
View Full Code Here

Examples of org.cipango.server.session.SessionManager.SessionScope

    }
  }

  public void setAttribute(String name, Object value)
  {
    SessionScope scope = openScope();
    try
    {
      _appSession.setAttribute(name, value);
    }
    finally
    {
      scope.close();
    }
  }
View Full Code Here

Examples of org.cipango.server.session.SessionManager.SessionScope

    }
  }

  public int setExpires(int deltaMinutes)
  {
    SessionScope scope = openScope();
    try
    {
      return _appSession.setExpires(deltaMinutes);
    }
    finally
    {
      scope.close();
    }
  }
View Full Code Here

Examples of org.cipango.server.session.SessionManager.SessionScope

    }
  }

  public void setInvalidateWhenReady(boolean invalidateWhenReady)
  {
    SessionScope scope = openScope();
    try
    {
      _appSession.setInvalidateWhenReady(invalidateWhenReady);
    }
    finally
    {
      scope.close();
    }
  }
View Full Code Here

Examples of org.cipango.server.session.SessionManager.SessionScope

  private AppSession _appSession;
 
  public ScopedTimer(AppSession session, long delay, boolean isPersistent, Serializable info)
  {
    _appSession = session;
    SessionScope scope = openScope();
    try
    {
      _timer = _appSession.newTimer(delay, isPersistent, info);
    }
    finally
    {
      scope.close();
    }
  }
View Full Code Here

Examples of org.cipango.server.session.SessionManager.SessionScope

  }
 
  public ScopedTimer(AppSession session, long delay, long period, boolean fixedDelay, boolean isPersistent, Serializable info)
  {
    _appSession = session;
    SessionScope scope = openScope();
    try
    {
      _timer = _appSession.newTimer(delay, period, fixedDelay, isPersistent, info);
    }
    finally
    {
      scope.close();
    }
  }
View Full Code Here

Examples of org.cipango.server.session.SessionManager.SessionScope

    return _appSession.getCallSession();
  }
 
  public void cancel()
  {
    SessionScope scope = openScope();
    try
    {
      _timer.cancel();
    }
    finally
    {
      scope.close();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.