private BOSHClientConnEvent(
            final BOSHClient source,
            final boolean cConnected,
            final List<ComposableBody> cRequests,
            final Throwable cCause) {
        super(source);
        connected = cConnected;
        cause = cCause;

        if (connected) {
            if (cCause != null) {
                throw(new IllegalStateException(
                        "Cannot be connected and have a cause"));
            }
            if (cRequests != null && cRequests.size() > 0) {
                throw(new IllegalStateException(
                        "Cannot be connected and have outstanding requests"));
            }
        }

        if (cRequests == null) {
            requests = Collections.emptyList();
        } else {
            // Defensive copy:
            requests = Collections.unmodifiableList(
                    new ArrayList<ComposableBody>(cRequests));
        }
    }