All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arjuna.mw.wst11.client.EnabledWSTXHandler Maven / Gradle / Ivy

The newest version!
/*
   Copyright The Narayana Authors
   SPDX-License-Identifier: Apache-2.0
 */


package com.arjuna.mw.wst11.client;

import jakarta.xml.ws.handler.soap.SOAPMessageContext;

/**
 * This handler is used when default-context-propagation is enabled. It handles every message unless WSTXFeature is
 * disabled.
 *
 * @author Gytis Trikleris
 *
 */
public final class EnabledWSTXHandler extends AbstractWSTXHandler {

    /**
     * @see com.arjuna.mw.wst11.client.AbstractWSTXHandler#isContextPropagationEnabled(SOAPMessageContext)
     *
     * @return false if WSTXFeature is present and is disabled, true otherwise.
     */
    @Override
    protected boolean isContextPropagationEnabled(SOAPMessageContext context) {
        return !WSTXFeature.DISABLED_VALUE.equals(context.get(WSTXFeature.REQUEST_CONTEXT_KEY));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy