/** * Returns the current {@link BasicEventContext instance} throwing an * exception if there isn't one. */ BasicEventContext current() { BasicEventContext c = list().getLast(); return c; }
public int size() { return list().size(); }
public Map<String, String> setContext(Map<String, String> ctx) { LinkedList<BasicEventContext> list = list(); if (list.size() == 0) { delayedCallContext.set(ctx); return null; } else { return list.getLast().setCallContext(ctx); } }
public Map<String, String> getContext() { return list().getLast().getCallContext(); }
public Principal getLast() { return list().getLast().getPrincipal(); }
public int logout() { LinkedList<BasicEventContext> list = list(); BasicEventContext bec = list.removeLast(); bec.getStats().methodOut(); if (log.isDebugEnabled()) { log.debug("Logged out: " + bec); } return list.size(); }
/** * Login method which can be used by the security system to replace the * existing {@link BasicEventContext}. */ public void login(BasicEventContext bec) { if (log.isDebugEnabled()) { log.debug("Logging in :" + bec); } checkDelayedCallContext(bec); list().add(bec); bec.getStats().methodIn(); }