Codota Logo
org.apache.stanbol.ontologymanager.servicesapi.session
Code IndexAdd Codota to your IDE (free)

How to use org.apache.stanbol.ontologymanager.servicesapi.session

Best Java code snippets using org.apache.stanbol.ontologymanager.servicesapi.session (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

protected void fireSessionDestroyed(Session session) {
  SessionEvent e = new SessionEvent(session, OperationType.KILL);
  for (SessionListener l : listeners)
    l.sessionChanged(e);
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

protected void fireScopeDetached(String scopeId) {
  for (SessionListener l : listeners)
    l.scopeDetached(this, scopeId);
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

protected void fireScopeAppended(String scopeId) {
  for (SessionListener l : listeners)
    l.scopeAppended(this, scopeId);
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

protected synchronized void removeSession(Session session) {
  String id = session.getID();
  Session s2 = sessionsByID.get(id);
  if (session == s2) sessionsByID.remove(id);
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

@Override
public void sessionChanged(SessionEvent event) {
  switch (event.getOperationType()) {
    case CREATE:
      updateSessionRegistration(event.getSession());
      break;
    case KILL:
      updateSessionUnregistration(event.getSession());
      break;
    default:
      break;
  }
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.servicesapi

@Override
public Session getSession() {
  // TODO Auto-generated method stub
  org.apache.stanbol.ontologymanager.servicesapi.session.Session session = super.getSession();
  if (session instanceof Session) return (Session) session;
  else throw new UnsupportedOperationException("Referenced session must be from the deprecated API.");
}
origin: apache/stanbol

@Override
public Session createSession() throws SessionLimitException {
  checkSessionLimit();
  Set<String> exclude = getRegisteredSessionIDs();
  Session session = null;
  while (session == null)
    try {
      session = createSession(idgen.createSessionID(exclude));
    } catch (DuplicateSessionIDException e) {
      exclude.add(e.getDuplicateID());
      continue;
    }
  return session;
}
origin: apache/stanbol

public SessionLimitException(int limit, Throwable cause) {
  this(limit);
  initCause(cause);
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.servicesapi

public NonReferenceableSessionException(Throwable cause) {
  initCause(cause);
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

private void checkSessionLimit() throws SessionLimitException {
  if (maxSessions >= 0 && sessionsByID.size() >= maxSessions) throw new SessionLimitException(
      maxSessions, "Cannot create new session. Limit of " + maxSessions + " already raeached.");
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

@Override
public State setActive(boolean active) throws NonReferenceableSessionException {
  if (getSessionState() == State.ZOMBIE) throw new NonReferenceableSessionException();
  else state = active ? State.ACTIVE : State.HALTED;
  return getSessionState();
}
origin: apache/stanbol

protected synchronized void removeSession(Session session) {
  String id = session.getID();
  Session s2 = sessionsByID.get(id);
  if (session == s2) sessionsByID.remove(id);
}
origin: apache/stanbol

protected void fireSessionCreated(Session session) {
  SessionEvent e = new SessionEvent(session, OperationType.CREATE);
  for (SessionListener l : listeners)
    l.sessionChanged(e);
}
origin: apache/stanbol

protected void fireScopeDetached(String scopeId) {
  for (SessionListener l : listeners)
    l.scopeDetached(this, scopeId);
}
origin: apache/stanbol

protected void fireScopeAppended(String scopeId) {
  for (SessionListener l : listeners)
    l.scopeAppended(this, scopeId);
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.servicesapi

public SessionLimitException(int limit, Throwable cause) {
  this(limit);
  initCause(cause);
}
origin: apache/stanbol

public NonReferenceableSessionException(Throwable cause) {
  initCause(cause);
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

private IRI getIRIforSession(Session session) {
  // Use the Stanbol-internal namespace, so that the whole configuration can be ported.
  return new IRI(_NS_STANBOL_INTERNAL + Session.shortName + "/" + session.getID());
}
origin: apache/stanbol

protected void fireSessionDestroyed(Session session) {
  SessionEvent e = new SessionEvent(session, OperationType.KILL);
  for (SessionListener l : listeners)
    l.sessionChanged(e);
}
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

protected void fireSessionCreated(Session session) {
  SessionEvent e = new SessionEvent(session, OperationType.CREATE);
  for (SessionListener l : listeners)
    l.sessionChanged(e);
}
org.apache.stanbol.ontologymanager.servicesapi.session

Most used classes

  • Session
    An ontology collector that can be used by client applications to store volatile data, e.g. for the d
  • SessionManager
    Manages session objects via CRUD-like operations. A SessionManager maintains in-memory storage of se
  • NonReferenceableSessionException
    Thrown whenever an attempt to access a session that is bound for removal is detected.
  • SessionEvent
    An event that encompasses a change in the state of a KReS session.
  • SessionLimitException
    Thrown whenever there is an attempt to exceed the maximum allowed number of active sessions.
  • Session$State,
  • SessionIDGenerator,
  • SessionListener
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now