use of it.unibo.arces.wot.sepa.commons.request.UnsubscribeRequest in project SEPA by arces-wot.
the class GenericClient method unsubscribe.
public void unsubscribe(String subID, long timeout, long nRetry) throws SEPASecurityException, SEPAPropertiesException, SEPAProtocolException, InterruptedException {
if (!subscriptions.containsKey(subID))
return;
synchronized (subLock) {
if (req != null)
subLock.wait();
req = new UnsubscribeRequest(subID, (appProfile.isSecure() ? appProfile.getAuthenticationProperties().getBearerAuthorizationHeader() : null), timeout, nRetry);
subscriptions.get(subID).unsubscribe((UnsubscribeRequest) req);
}
}
Aggregations