/*
 * Decompiled with CFR 0.152.
 */
package org.jivesoftware.smack.iqrequest;

import org.jivesoftware.smack.iqrequest.IQRequestHandler;
import org.jivesoftware.smack.packet.IQ;

public abstract class AbstractIqRequestHandler
implements IQRequestHandler {
    private final String element;
    private final String namespace;
    private final IQ.Type type;
    private final IQRequestHandler.Mode mode;

    protected AbstractIqRequestHandler(String element, String namespace, IQ.Type type, IQRequestHandler.Mode mode) {
        switch (type) {
            case set: 
            case get: {
                break;
            }
            default: {
                throw new IllegalArgumentException("Only get and set IQ type allowed");
            }
        }
        this.element = element;
        this.namespace = namespace;
        this.type = type;
        this.mode = mode;
    }

    @Override
    public abstract IQ handleIQRequest(IQ var1);

    @Override
    public IQRequestHandler.Mode getMode() {
        return this.mode;
    }

    @Override
    public IQ.Type getType() {
        return this.type;
    }

    @Override
    public String getElement() {
        return this.element;
    }

    @Override
    public String getNamespace() {
        return this.namespace;
    }
}
