MCPcopy Create free account
hub / github.com/BaseXdb/basex / info

Method info

basex-core/src/main/java/org/basex/server/Sessions.java:21–31  ·  view source on GitHub ↗

Returns information about the currently opened sessions. @return data reference

()

Source from the content-addressed store, hash-verified

19 * @return data reference
20 */
21 public synchronized String info() {
22 final TokenBuilder tb = new TokenBuilder();
23 tb.addExt(SESSIONS_X, size()).add(size() == 0 ? DOT : COL);
24
25 final StringList sl = new StringList();
26 for(final ClientListener cl : this) {
27 sl.add(cl.context().user().name() + ' ' + cl);
28 }
29 for(final String sp : sl.sort()) tb.add(NL).add(LI).add(sp);
30 return tb.toString();
31 }
32
33 /**
34 * Closes all sessions.

Callers

nothing calls this directly

Calls 10

addExtMethod · 0.95
addMethod · 0.95
sortMethod · 0.95
addMethod · 0.95
toStringMethod · 0.95
addMethod · 0.65
sizeMethod · 0.65
nameMethod · 0.65
userMethod · 0.45
contextMethod · 0.45

Tested by

no test coverage detected