< prev index next >
jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -40,10 +40,12 @@
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.soap.MTOMFeature;
import javax.xml.ws.soap.SOAPBinding;
import java.util.*;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
/**
* @author WS Development Team
*/
public final class SOAPBindingImpl extends BindingImpl implements SOAPBinding {
@@ -55,10 +57,11 @@
//protected boolean enableMtom;
protected final SOAPVersion soapVersion;
private Set<QName> portKnownHeaders = Collections.emptySet();
private Set<QName> bindingUnderstoodHeaders = new HashSet<QName>();
+ private final Lock lock = new ReentrantLock();
/**
* Use {@link BindingImpl#create(BindingID)} to create this.
*
* @param bindingId SOAP binding ID
@@ -93,11 +96,17 @@
* processing.
*
* @param headers SOAP header names
*/
public void setPortKnownHeaders(@NotNull Set<QName> headers) {
+
+ try{
+ lock.lock();
this.portKnownHeaders = headers;
+ } finally {
+ lock.unlock();
+ }
}
/**
* TODO A feature should be created to configure processing of MU headers.
* @param header
< prev index next >