users@jersey.java.net

Successful response

From: António Mota <amsmota_at_gmail.com>
Date: Tue, 01 Sep 2009 10:18:28 +0100

Wouldn't be a good idea to add methods to the ResponseImpl such as

public boolean sucessfull(){
        int status = this.getStatus();
        Status statusCode = Status.fromStatusCode(status);
        if (statusCode!=null && statusCode.getFamily() !=
Family.SUCCESSFUL) {
            return false;
        }
        return true;
}

or perhaps more general

public boolean resulted(Family family){
        int status = this.getStatus();
        Status statusCode = Status.fromStatusCode(status);
        if (statusCode!=null && statusCode.getFamily() != family) {
            return false;
        }
        return true;
}