/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tuscany.sca.binding.ws.axis2.policy.header; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.Phase; import org.apache.tuscany.sca.invocation.PhasedInterceptor; import org.apache.tuscany.sca.policy.PolicySet; /** * * @version $Rev$ $Date$ */ public class Axis2HeaderReferencePolicyInterceptor implements PhasedInterceptor { private Invoker next; private Operation operation; private PolicySet policySet = null; private String context; private Axis2HeaderPolicy policy; public Axis2HeaderReferencePolicyInterceptor(String context, Operation operation, PolicySet policySet) { super(); this.operation = operation; this.policySet = policySet; this.context = context; init(); } private void init() { if (policySet != null) { for (Object policyObject : policySet.getPolicies()){ if (policyObject instanceof Axis2HeaderPolicy){ policy = (Axis2HeaderPolicy)policyObject; break; } } } } public Message invoke(Message msg) { // TODO - not yet implemented return getNext().invoke(msg); } public Invoker getNext() { return next; } public void setNext(Invoker next) { this.next = next; } public String getPhase() { return Phase.REFERENCE_POLICY; } }