/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.message.JmsKnob
 *  com.l7tech.policy.assertion.AssertionStatus
 *  com.l7tech.policy.assertion.JmsTransportAssertion
 *  com.l7tech.policy.assertion.PolicyAssertionException
 */
package com.l7tech.server.policy.assertion;

import com.l7tech.message.JmsKnob;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.JmsTransportAssertion;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.assertion.AbstractServerAssertion;
import com.l7tech.server.policy.assertion.ServerAssertion;
import java.io.IOException;

public class ServerJmsTransportAssertion
extends AbstractServerAssertion
implements ServerAssertion {
    private JmsTransportAssertion d;

    public ServerJmsTransportAssertion(JmsTransportAssertion jmsTransportAssertion) {
        super(jmsTransportAssertion);
        this.d = jmsTransportAssertion;
    }

    @Override
    public AssertionStatus checkRequest(PolicyEnforcementContext policyEnforcementContext) throws IOException, PolicyAssertionException {
        try {
            if (policyEnforcementContext.getRequest().getKnob(JmsKnob.class) != null) {
                return AssertionStatus.NONE;
            }
        }
        catch (IOException iOException) {
            throw ServerJmsTransportAssertion.a(iOException);
        }
        return AssertionStatus.FALSIFIED;
    }

    private static IOException a(IOException iOException) {
        return iOException;
    }
}

