public synchronized IntermediateSession createDetachedIntermediateSession(IntermediateSessionParams params) {
        if (destroyed.get()) {
            throw new IllegalStateException("Object is destroyed.");
        }
        if (sessions.containsKey(params.getName())) {
            throw new IllegalArgumentException("Name '" + params.getName() + "' is not unique.");
        }
        IntermediateSession session = new IntermediateSession(this, params);
        sessions.put(params.getName(), session);
        return session;
    }
<p>Creates an intermediate session on top of this message bus using the
given handlers and parameter object.</p>

@param params The parameters to control the session.
@return The created session.
messagebus/src/main/java/com/yahoo/messagebus/MessageBus.java