The public interface of the CancellableRequest only includes a cancel method and an identifier. It doesn't contain any informations about a request and is also only intended to be used for a request cancellation.
My suggestion is to rename the CancellableRequest into CancellationToken, RequestToken or define a proper interface to represent a non opaque request.
The public interface of the
CancellableRequest
only includes acancel
method and anidentifier
. It doesn't contain any informations about a request and is also only intended to be used for a request cancellation.My suggestion is to rename the
CancellableRequest
intoCancellationToken
,RequestToken
or define a proper interface to represent a non opaque request.