If you create a SwiftClient with a token, a new listener will be added added to OpenStack.CLIENT.listeners collection for every call to SwiftClient.execute. This listener is never popped out the collection and, therefore, a garbage collector or heap space exception will raise eventually.
publicclassSwiftClientextendsAbstractOpenStackClient {
publicSwiftClient(StringendpointURL, Stringtoken) {
super(endpointURL, token);
}
public <R> Rexecute(SwiftCommand<R> command) {
WebTargetendpoint = OpenStack.CLIENT.target(endpointURL);
if(token != null) {
endpoint.register(tokenFilter);
}
returncommand.execute(endpoint);
}
}There is no way to remove the listener once it has been added. The only available option is to create a new JerseyClient.
If you create a SwiftClient with a token, a new listener will be added added to OpenStack.CLIENT.listeners collection for every call to SwiftClient.execute. This listener is never popped out the collection and, therefore, a garbage collector or heap space exception will raise eventually.
There is no way to remove the listener once it has been added. The only available option is to create a new JerseyClient.