Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.javaswift.joss.command.impl.core;
 
public abstract class AbstractSecureCommand<M extends HttpRequestBase, N> extends AbstractCommand<M, N> {
    private Account account;
    public AbstractSecureCommand(Account accountHttpClient httpClientString urlString token) {
        super(httpClienturl);
        this. = account;
        setToken(token);
        setConnectionKeepAlive();
    }
    public static String getURL(Access accessObjectStoreEntity entity) {
        return access.getPublicURL() + entity.getPath();
    }
    @Override
    public N call() {
        .increaseCallCounter();
        try {
            return super.call();
        } catch (UnauthorizedException err) {
            if (.isAllowReauthenticate()) {
                Access access = .authenticate();
                setToken(access.getToken());
                return super.call();
            }
            throw err;
        }
    }
    protected void setConnectionKeepAlive() {
        setHeader(new ConnectionKeepAlive());
    }
    private void setToken(String token) {
        setHeader(new Token(token));
    }
New to GrepCode? Check out our FAQ X