From jbossws-commits at lists.jboss.org Fri May 16 08:39:35 2014
Content-Type: multipart/mixed; boundary="===============8671809879914681480=="
MIME-Version: 1.0
From: jbossws-commits at lists.jboss.org
To: jbossws-commits at lists.jboss.org
Subject: [jbossws-commits] JBossWS SVN: r18663 -
api/trunk/src/main/java/org/jboss/ws/api/handler.
Date: Fri, 16 May 2014 08:39:35 -0400
Message-ID: <201405161239.s4GCdZ61013417@svn01.web.mwc.hst.phx2.redhat.com>
--===============8671809879914681480==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: asoldano
Date: 2014-05-16 08:39:35 -0400 (Fri, 16 May 2014)
New Revision: 18663
Modified:
api/trunk/src/main/java/org/jboss/ws/api/handler/GenericHandler.java
api/trunk/src/main/java/org/jboss/ws/api/handler/GenericLogicalHandler.j=
ava
api/trunk/src/main/java/org/jboss/ws/api/handler/GenericSOAPHandler.java
Log:
[JBWS-3795] Improve and fix org.jboss.ws.api.handler.* classes
Modified: api/trunk/src/main/java/org/jboss/ws/api/handler/GenericHandler.j=
ava
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- api/trunk/src/main/java/org/jboss/ws/api/handler/GenericHandler.java 20=
14-05-16 10:02:58 UTC (rev 18662)
+++ api/trunk/src/main/java/org/jboss/ws/api/handler/GenericHandler.java 20=
14-05-16 12:39:35 UTC (rev 18663)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -30,11 +30,12 @@
* A generic JAX-WS handler
*
* @author Thomas Diesler
+ * @author Alessio Soldano<=
/a>
* @since 13-Aug-2006
*/
-public abstract class GenericHandler implements Handler
+public abstract class GenericHandler implements =
Handler
{
- private String handlerName;
+ private volatile String handlerName;
=
public String getHandlerName()
{
@@ -46,7 +47,7 @@
this.handlerName =3D handlerName;
}
=
- public boolean handleMessage(MessageContext msgContext)
+ public boolean handleMessage(C msgContext)
{
Boolean outbound =3D (Boolean)msgContext.get(MessageContext.MESSAGE_=
OUTBOUND_PROPERTY);
if (outbound =3D=3D null)
@@ -55,17 +56,17 @@
return outbound ? handleOutbound(msgContext) : handleInbound(msgCont=
ext);
}
=
- protected boolean handleOutbound(MessageContext msgContext)
+ protected boolean handleOutbound(C msgContext)
{
return true;
}
=
- protected boolean handleInbound(MessageContext msgContext)
+ protected boolean handleInbound(C msgContext)
{
return true;
}
=
- public boolean handleFault(MessageContext messagecontext)
+ public boolean handleFault(C messagecontext)
{
return true;
}
Modified: api/trunk/src/main/java/org/jboss/ws/api/handler/GenericLogicalHa=
ndler.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- api/trunk/src/main/java/org/jboss/ws/api/handler/GenericLogicalHandler.=
java 2014-05-16 10:02:58 UTC (rev 18662)
+++ api/trunk/src/main/java/org/jboss/ws/api/handler/GenericLogicalHandler.=
java 2014-05-16 12:39:35 UTC (rev 18663)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -30,6 +30,6 @@
* @author Thomas Diesler
* @since 13-Aug-2006
*/
-public class GenericLogicalHandler extend=
s GenericHandler implements LogicalHandler
+public class GenericLogicalHandler extend=
s GenericHandler implements LogicalHandler
{
}
Modified: api/trunk/src/main/java/org/jboss/ws/api/handler/GenericSOAPHandl=
er.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- api/trunk/src/main/java/org/jboss/ws/api/handler/GenericSOAPHandler.jav=
a 2014-05-16 10:02:58 UTC (rev 18662)
+++ api/trunk/src/main/java/org/jboss/ws/api/handler/GenericSOAPHandler.jav=
a 2014-05-16 12:39:35 UTC (rev 18663)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -21,23 +21,25 @@
*/
package org.jboss.ws.api.handler;
=
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
=
import javax.xml.namespace.QName;
-import javax.xml.ws.handler.LogicalMessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
=
/**
* A generic JAX-WS soap handler
*
- * @author Thomas.Diesler(a)jboss.org
+ * @author Thomas Diesler
+ * @author Alessio Soldano<=
/a>
* @since 13-Aug-2006
*/
-public abstract class GenericSOAPHandler =
extends GenericHandler implements SOAPHandler
+public abstract class GenericSOAPHandler ext=
ends GenericHandler implements SOAPHandler
{
// The header blocks that can be processed by this Handler instance
- private Set headers =3D new HashSet();
+ private volatile Set headers =3D null;
=
/**
* Gets the header blocks that can be processed by this Handler instanc=
e.
@@ -46,7 +48,11 @@
*/
public Set getHeaders()
{
- return headers;
+ if (headers =3D=3D null) {
+ return Collections.emptySet();
+ } else {
+ return headers;
+ }
}
=
/**
@@ -56,6 +62,6 @@
*/
public void setHeaders(Set headers)
{
- this.headers =3D headers;
+ this.headers =3D Collections.unmodifiableSet(new HashSet(head=
ers));
}
}
--===============8671809879914681480==--