List of usage examples for com.mongodb.client ClientSession getServerSession
ServerSession getServerSession();
From source file:org.restheart.db.sessions.ClientSessionImpl.java
License:Open Source License
public static UUID getSid(ClientSession cs) { if (cs != null && cs.getServerSession() != null && cs.getServerSession().getIdentifier() != null && cs.getServerSession().getIdentifier().isDocument() && cs.getServerSession().getIdentifier().asDocument().containsKey("id") && cs.getServerSession().getIdentifier().asDocument().get("id").isBinary()) { return cs.getServerSession().getIdentifier().asDocument().get("id").asBinary().asUuid(); } else {/*from w w w. jav a 2 s .c om*/ return null; } }