com.fasterxml.clustermate.client.call.ListCallResult 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 java.util.List;
import com.fasterxml.clustermate.api.ClusterMateConstants;
import com.fasterxml.clustermate.api.msg.ListResponse;
import com.fasterxml.clustermate.client.CallFailure;
import com.fasterxml.storemate.shared.StorableKey;
public abstract class ListCallResult
extends CallResult
{
protected final List _items;
protected final StorableKey _lastSeen;
/*
/**********************************************************************
/* Construction, initialization
/**********************************************************************
*/
public ListCallResult(ListResponse resp)
{
super(ClusterMateConstants.HTTP_STATUS_OK);
_items = resp.items;
_lastSeen = resp.lastSeen;
}
public ListCallResult(CallFailure fail)
{
super(fail);
_items = null;
_lastSeen = null;
}
public ListCallResult(int statusCode)
{
super(statusCode);
_items = null;
_lastSeen = null;
}
/*
/**********************************************************************
/* CallResult impl
/**********************************************************************
*/
@Override
public abstract String getHeaderValue(String key);
/*
/**********************************************************************
/* Extended API
/**********************************************************************
*/
public List getItems() { return _items; }
public StorableKey getLastSeen() { return _lastSeen; }
}