class RequestContextUtils {

    public static Optional<InstanceInfo> getInstanceInfo() {
        Object o = RequestContext.getCurrentContext().get(INSTANCE_INFO_KEY);
        if (!(o instanceof InstanceInfo)) {
            return Optional.empty();
        } else {
            return Optional.of((InstanceInfo) o);
        }
    }

    private  RequestContextUtils();

}