congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Session.getStartTimestamp
Code IndexAdd Tabnine to your IDE (free)

How to use
getStartTimestamp
method
in
org.apache.shiro.session.Session

Best Java code snippets using org.apache.shiro.session.Session.getStartTimestamp (Showing top 19 results out of 315)

origin: apache/shiro

/**
 * Immediately delegates to the underlying proxied session.
 */
public Date getStartTimestamp() {
  return delegate.getStartTimestamp();
}
origin: apache/shiro

public long getCreationTime() {
  try {
    return getSession().getStartTimestamp().getTime();
  } catch (Exception e) {
    throw new IllegalStateException(e);
  }
}
origin: apache/shiro

public Date getStartTimestamp(SessionKey key) {
  return lookupRequiredSession(key).getStartTimestamp();
}
origin: Graylog2/graylog2-server

@Override
protected Serializable doCreate(Session session) {
  final Serializable id = generateSessionId(session);
  assignSessionId(session, id);
  Map<String, Object> fields = Maps.newHashMap();
  fields.put("session_id", id);
  fields.put("host", session.getHost());
  fields.put("start_timestamp", session.getStartTimestamp());
  fields.put("last_access_time", session.getLastAccessTime());
  fields.put("timeout", session.getTimeout());
  Map<String, Object> attributes = Maps.newHashMap();
  for (Object key : session.getAttributeKeys()) {
    attributes.put(key.toString(), session.getAttribute(key));
  }
  fields.put("attributes", attributes);
  final MongoDbSession dbSession = new MongoDbSession(fields);
  final String objectId = mongoDBSessionService.saveWithoutValidation(dbSession);
  LOG.debug("Created session {}", objectId);
  return id;
}
origin: killbill/killbill

public SessionModelDao(final Session session) {
  this.id = session.getId() == null ? null : session.getId().toString();
  this.startTimestamp = new DateTime(session.getStartTimestamp(), DateTimeZone.UTC);
  this.lastAccessTime = new DateTime(session.getLastAccessTime(), DateTimeZone.UTC);
  this.timeout = session.getTimeout();
  this.host = session.getHost();
  try {
    this.sessionData = serializeSessionData(session);
  } catch (final IOException e) {
    this.sessionData = new byte[]{};
  }
}
origin: Graylog2/graylog2-server

dbSession.setHost(session.getHost());
dbSession.setTimeout(session.getTimeout());
dbSession.setStartTimestamp(session.getStartTimestamp());
dbSession.setLastAccessTime(session.getLastAccessTime());
origin: org.apache.shiro/shiro-core

/**
 * Immediately delegates to the underlying proxied session.
 */
public Date getStartTimestamp() {
  return delegate.getStartTimestamp();
}
origin: wuyouzhuguli/FEBS-Shiro

@Override
public List<UserOnline> list() {
  List<UserOnline> list = new ArrayList<>();
  Collection<Session> sessions = sessionDAO.getActiveSessions();
  for (Session session : sessions) {
    UserOnline userOnline = new UserOnline();
    User user;
    SimplePrincipalCollection principalCollection;
    if (session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY) == null) {
      continue;
    } else {
      principalCollection = (SimplePrincipalCollection) session
          .getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
      user = (User) principalCollection.getPrimaryPrincipal();
      userOnline.setUsername(user.getUsername());
      userOnline.setUserId(user.getUserId().toString());
    }
    userOnline.setId((String) session.getId());
    userOnline.setHost(session.getHost());
    userOnline.setStartTimestamp(session.getStartTimestamp());
    userOnline.setLastAccessTime(session.getLastAccessTime());
    long timeout = session.getTimeout();
    userOnline.setStatus(timeout == 0L ? "0" : "1");
    String address = AddressUtils.getCityInfo(userOnline.getHost());
    userOnline.setLocation(address);
    userOnline.setTimeout(timeout);
    list.add(userOnline);
  }
  return list;
}
origin: org.apache.shiro/shiro-core

public Date getStartTimestamp(SessionKey key) {
  return lookupRequiredSession(key).getStartTimestamp();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.shiro

/**
 * Immediately delegates to the underlying proxied session.
 */
public Date getStartTimestamp() {
  return delegate.getStartTimestamp();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.shiro

public Date getStartTimestamp(SessionKey key) {
  return lookupRequiredSession(key).getStartTimestamp();
}
origin: org.kill-bill.billing/killbill-jaxrs

public SessionJson(final Session session) {
  this.id = session.getId() == null ? null : session.getId().toString();
  this.startDate = session.getStartTimestamp() == null ? null : new DateTime(session.getStartTimestamp(), DateTimeZone.UTC);
  this.lastAccessDate = session.getLastAccessTime() == null ? null : new DateTime(session.getLastAccessTime(), DateTimeZone.UTC);
  this.timeout = session.getTimeout();
  this.host = session.getHost();
}
origin: com.ning.billing/killbill-jaxrs

public SessionJson(final Session session) {
  this.id = session.getId() == null ? null : session.getId().toString();
  this.startDate = session.getStartTimestamp() == null ? null : new DateTime(session.getStartTimestamp(), DateTimeZone.UTC);
  this.lastAccessDate = session.getLastAccessTime() == null ? null : new DateTime(session.getLastAccessTime(), DateTimeZone.UTC);
  this.timeout = session.getTimeout();
  this.host = session.getHost();
}
origin: com.ning.billing/killbill-util

public SessionModelDao(final Session session) {
  this.recordId = (Long) session.getId();
  this.startTimestamp = new DateTime(session.getStartTimestamp(), DateTimeZone.UTC);
  this.lastAccessTime = new DateTime(session.getLastAccessTime(), DateTimeZone.UTC);
  this.timeout = session.getTimeout();
  this.host = session.getHost();
  try {
    this.sessionData = serializeSessionData(session);
  } catch (IOException e) {
    this.sessionData = new byte[]{};
  }
}
origin: org.kill-bill.billing/killbill-util

public SessionModelDao(final Session session) {
  this.id = session.getId() == null ? null : session.getId().toString();
  this.startTimestamp = new DateTime(session.getStartTimestamp(), DateTimeZone.UTC);
  this.lastAccessTime = new DateTime(session.getLastAccessTime(), DateTimeZone.UTC);
  this.timeout = session.getTimeout();
  this.host = session.getHost();
  try {
    this.sessionData = serializeSessionData(session);
  } catch (final IOException e) {
    this.sessionData = new byte[]{};
  }
}
origin: org.graylog2/graylog2-server

@Override
protected Serializable doCreate(Session session) {
  final Serializable id = generateSessionId(session);
  assignSessionId(session, id);
  Map<String, Object> fields = Maps.newHashMap();
  fields.put("session_id", id);
  fields.put("host", session.getHost());
  fields.put("start_timestamp", session.getStartTimestamp());
  fields.put("last_access_time", session.getLastAccessTime());
  fields.put("timeout", session.getTimeout());
  Map<String, Object> attributes = Maps.newHashMap();
  for (Object key : session.getAttributeKeys()) {
    attributes.put(key.toString(), session.getAttribute(key));
  }
  fields.put("attributes", attributes);
  final MongoDbSession dbSession = new MongoDbSession(fields);
  final String objectId = mongoDBSessionService.saveWithoutValidation(dbSession);
  LOG.debug("Created session {}", objectId);
  return id;
}
origin: com.github.fartherp/shiro-redisson

public void setSession(Session session) {
  this.id = session.getId();
  this.startTimestamp = session.getStartTimestamp();
  this.lastAccessTime = session.getLastAccessTime();
  this.timeout = session.getTimeout();
  this.host = session.getHost();
  if (session instanceof SimpleSession) {
    this.stopTimestamp = ((SimpleSession) session).getStopTimestamp();
    this.expired = ((SimpleSession) session).isExpired();
    this.attributes = ((SimpleSession) session).getAttributes();
  }
}
origin: org.graylog2/graylog2-server

dbSession.setHost(session.getHost());
dbSession.setTimeout(session.getTimeout());
dbSession.setStartTimestamp(session.getStartTimestamp());
dbSession.setLastAccessTime(session.getLastAccessTime());
origin: com.gitee.qdbp/qdbp-base-ctl

bean.setStartTimestamp(session.getStartTimestamp());
bean.setLastAccessTime(session.getLastAccessTime());
bean.setTimeout(session.getTimeout());
org.apache.shiro.sessionSessiongetStartTimestamp

Javadoc

Returns the time the session was started; that is, the time the system created the instance.

Popular methods of Session

  • getAttribute
    Returns the object bound to this session identified by the specified key. If there is no object boun
  • setAttribute
    Binds the specified value to this session, uniquely identified by the specifed key name. If there is
  • getId
    Returns the unique identifier assigned by the system upon session creation. All return values from t
  • removeAttribute
    Removes (unbinds) the object bound to this session under the specified key name.
  • getHost
    Returns the host name or IP string of the host that originated this session, or nullif the host is u
  • getTimeout
    Returns the time in milliseconds that the session session may remain idle before expiring. * A negat
  • getLastAccessTime
    Returns the last time the application received a request or method invocation from the user associat
  • setTimeout
    Sets the time in milliseconds that the session may remain idle before expiring. * A negative val
  • getAttributeKeys
    Returns the keys of all the attributes stored under this session. If there are no attributes, this r
  • stop
    Explicitly stops (invalidates) this session and releases all associated resources. If this session h
  • touch
    Explicitly updates the #getLastAccessTime() of this session to the current time when this method is
  • touch

Popular in Java

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
  • Kernel (java.awt.image)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • JOptionPane (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now