com.fasterxml.clustermate.client.call.HeadCallResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clustermate-client Show documentation
Show all versions of clustermate-client Show documentation
Building blocks for client libraries that access
ClusterMate-based service.
package com.fasterxml.clustermate.client.call;
import com.fasterxml.clustermate.client.CallFailure;
public abstract class HeadCallResult
extends CallResult
{
protected final long _contentLength;
/*
/**********************************************************************
/* Construction, initialization
/**********************************************************************
*/
protected HeadCallResult(int status, long contentLength)
{
super(status);
_contentLength = contentLength;
}
protected HeadCallResult(CallFailure fail)
{
super(fail);
_contentLength = -1;
}
/*
/**********************************************************************
/* CallResult impl
/**********************************************************************
*/
@Override
public abstract String getHeaderValue(String key);
/*
/**********************************************************************
/* Extended API
/**********************************************************************
*/
public long getContentLength() { return _contentLength; }
public boolean hasContentLength() { return _contentLength >= 0L; }
}