Author: jim.ma
Date: 2015-04-07 04:47:00 -0400 (Tue, 07 Apr 2015)
New Revision: 19624
Added:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsOutIntercetpor.java
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointFeaturePutInterceptor.java
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableFeature.java
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableGZIPFeature.java
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableLoggingFeature.java
Removed:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsPutOutIntercetpor.java
Modified:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsPutInterceptor.java
Log:
[JBWS-3898]:Add interceptors to dynamically configure logging and gzip feature
Modified:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
---
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2015-04-03
20:49:04 UTC (rev 19623)
+++
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2015-04-07
08:47:00 UTC (rev 19624)
@@ -77,6 +77,7 @@
import org.jboss.wsf.stack.cxf.interceptor.EndpointAssociationInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.EndpointConfigsGetInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.EndpointConfigsPutInterceptor;
+import org.jboss.wsf.stack.cxf.interceptor.EndpointFeaturePutInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.EndpointMetricsGetInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.EndpointRecordGetInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor;
@@ -220,6 +221,7 @@
bus.getInInterceptors().add(new EndpointConfigsPutInterceptor());
bus.getInInterceptors().add(new EndpointMetricsGetInterceptor());
bus.getInInterceptors().add(new EndpointRecordGetInterceptor());
+ bus.getInInterceptors().add(new EndpointFeaturePutInterceptor());
bus.getInInterceptors().add(new NsCtxSelectorStoreInterceptor());
final String p = (props != null) ?
props.get(Constants.JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS) : null;
Added:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsOutIntercetpor.java
===================================================================
---
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsOutIntercetpor.java
(rev 0)
+++
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsOutIntercetpor.java 2015-04-07
08:47:00 UTC (rev 19624)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.interceptor;
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.MessageSenderInterceptor;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.Phase;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.codehaus.jettison.AbstractXMLStreamWriter;
+import org.codehaus.jettison.mapped.MappedNamespaceConvention;
+import org.codehaus.jettison.mapped.MappedXMLStreamWriter;
+
+/**
+ * Out Interceptor to write json format endpoint config set result. This interceptor is
added to interceptorchain by
+ * @see org.jboss.wsf.stack.cxf.interceptor.EndpointsConfigsPutInterceptor
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ *
+ */
+public class EndpointConfigsOutIntercetpor extends AbstractManagementInterceptor
+{
+ public static final EndpointConfigsOutIntercetpor INSTANCE = new
EndpointConfigsOutIntercetpor();
+ public static final String CONFIG_RESULT =
EndpointConfigsOutIntercetpor.class.getName() + ".ConfigResult";
+ public EndpointConfigsOutIntercetpor()
+ {
+ super(Phase.PREPARE_SEND);
+ this.addAfter(MessageSenderInterceptor.class.getName());
+ }
+
+ public void handleMessage(Message message) throws Fault
+ {
+ String configResult = (String)message.get(CONFIG_RESULT);
+ if (configResult == null)
+ {
+ return;
+ }
+ message.remove(CONFIG_RESULT);
+ OutputStream out = message.getContent(OutputStream.class);
+ if (out == null)
+ {
+ return;
+ }
+ setContentType(message);
+ OutputStreamWriter writer = null;
+ AbstractXMLStreamWriter mappedWriter = null;
+ try
+ {
+ writer = new OutputStreamWriter(out, getEncoding(message));
+ mappedWriter = new MappedXMLStreamWriter(new MappedNamespaceConvention(),
writer);
+ mappedWriter.writeStartDocument();
+
+ mappedWriter.writeStartElement("result");
+ mappedWriter.writeCharacters(configResult);
+ mappedWriter.writeEndElement();
+
+ mappedWriter.writeEndDocument();
+ out.flush();
+ }
+ catch (Exception e)
+ {
+ throw new Fault(e);
+ }
+ finally
+ {
+ StaxUtils.close(mappedWriter);
+ }
+
+ }
+
+}
Property changes on:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsOutIntercetpor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsPutInterceptor.java
===================================================================
---
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsPutInterceptor.java 2015-04-03
20:49:04 UTC (rev 19623)
+++
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsPutInterceptor.java 2015-04-07
08:47:00 UTC (rev 19624)
@@ -42,9 +42,8 @@
public class EndpointConfigsPutInterceptor extends AbstractMangementInInterceptor
{
public static final EndpointConfigsPutInterceptor INSTANCE = new
EndpointConfigsPutInterceptor();
- public static final String CONFIG_RESULT =
EndpointConfigsPutInterceptor.class.getName() + ".EndpointConfigPutResult";
public static final Set<String> httpMethods;
- private Interceptor<Message> configPutOutInteceptor =
EndpointConfigsPutOutIntercetpor.INSTANCE;
+ private Interceptor<Message> configPutOutInteceptor =
EndpointConfigsOutIntercetpor.INSTANCE;
static
{
@@ -91,7 +90,7 @@
listenerManager.getListeners(key).configChange(message, queryMaps.get(key));
}
}
- mout.put(CONFIG_RESULT, "Successfully set endpoint runtime
configurations.");
+ mout.put(EndpointConfigsOutIntercetpor.CONFIG_RESULT, "Successfully set
endpoint runtime configurations.");
cleanUpOutInterceptors(mout);
mout.getInterceptorChain().add(configPutOutInteceptor);
message.getInterceptorChain().doInterceptStartingAt(message,
OutgoingChainInterceptor.class.getName());
Deleted:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsPutOutIntercetpor.java
===================================================================
---
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsPutOutIntercetpor.java 2015-04-03
20:49:04 UTC (rev 19623)
+++
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointConfigsPutOutIntercetpor.java 2015-04-07
08:47:00 UTC (rev 19624)
@@ -1,92 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2015, 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.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf.interceptor;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.interceptor.MessageSenderInterceptor;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.Phase;
-import org.apache.cxf.staxutils.StaxUtils;
-import org.codehaus.jettison.AbstractXMLStreamWriter;
-import org.codehaus.jettison.mapped.MappedNamespaceConvention;
-import org.codehaus.jettison.mapped.MappedXMLStreamWriter;
-
-/**
- * Out Interceptor to write json format endpoint config set result. This interceptor is
added to interceptorchain by
- * @see org.jboss.wsf.stack.cxf.interceptor.EndpointsConfigsPutInterceptor
- * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
- *
- */
-public class EndpointConfigsPutOutIntercetpor extends AbstractManagementInterceptor
-{
- public static final EndpointConfigsPutOutIntercetpor INSTANCE = new
EndpointConfigsPutOutIntercetpor();
-
- public EndpointConfigsPutOutIntercetpor()
- {
- super(Phase.PREPARE_SEND);
- this.addAfter(MessageSenderInterceptor.class.getName());
- }
-
- public void handleMessage(Message message) throws Fault
- {
- String configResult =
(String)message.get(EndpointConfigsPutInterceptor.CONFIG_RESULT);
- if (configResult == null)
- {
- return;
- }
- message.remove(EndpointConfigsPutInterceptor.CONFIG_RESULT);
- OutputStream out = message.getContent(OutputStream.class);
- if (out == null)
- {
- return;
- }
- setContentType(message);
- OutputStreamWriter writer = null;
- AbstractXMLStreamWriter mappedWriter = null;
- try
- {
- writer = new OutputStreamWriter(out, getEncoding(message));
- mappedWriter = new MappedXMLStreamWriter(new MappedNamespaceConvention(),
writer);
- mappedWriter.writeStartDocument();
-
- mappedWriter.writeStartElement("result");
- mappedWriter.writeCharacters(configResult);
- mappedWriter.writeEndElement();
-
- mappedWriter.writeEndDocument();
- out.flush();
- }
- catch (Exception e)
- {
- throw new Fault(e);
- }
- finally
- {
- StaxUtils.close(mappedWriter);
- }
-
- }
-
-}
Added:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointFeaturePutInterceptor.java
===================================================================
---
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointFeaturePutInterceptor.java
(rev 0)
+++
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointFeaturePutInterceptor.java 2015-04-07
08:47:00 UTC (rev 19624)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.interceptor;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.apache.cxf.binding.soap.interceptor.EndpointSelectionInterceptor;
+import org.apache.cxf.feature.LoggingFeature;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.interceptor.OutgoingChainInterceptor;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.Phase;
+import org.apache.cxf.transport.common.gzip.GZIPFeature;
+import org.jboss.wsf.stack.cxf.interceptor.util.RemovableFeature;
+import org.jboss.wsf.stack.cxf.interceptor.util.RemovableLoggingFeature;
+
+/**
+ * Interceptor to allow dynamically enalbe cxf features
+ * responds to url like
http://localhost:8080/context/wsendpoint/management?logging=true
+ * We now support Logging and GZIP feature
+ * @author <a href="mailto:ema@redhat.com>Jim Ma</a>
+ *
+ */
+public class EndpointFeaturePutInterceptor extends AbstractMangementInInterceptor
+{
+ public static final Set<String> httpMethods;
+ public static final Map<String, RemovableFeature> featureClassMap = new
HashMap<String, RemovableFeature>(4);
+ private Interceptor<Message> configOutInteceptor =
EndpointConfigsOutIntercetpor.INSTANCE;
+ static
+ {
+ httpMethods = new HashSet<String>(4);
+ httpMethods.add("PUT");
+ httpMethods.add("GET");
+ featureClassMap.put("logging", new RemovableLoggingFeature(new
LoggingFeature()));
+ featureClassMap.put("gzip", new RemovableLoggingFeature(new
GZIPFeature()));
+ }
+
+ public EndpointFeaturePutInterceptor()
+ {
+ super(Phase.READ);
+ getAfter().add(EndpointSelectionInterceptor.class.getName());
+ }
+ public EndpointFeaturePutInterceptor(Interceptor<Message> outInterceptor)
+ {
+ this();
+ configOutInteceptor = outInterceptor;
+ }
+
+ @Override
+ public void handleMessage(Message message) throws Fault
+ {
+ if (!isAllowed(message))
+ {
+ return;
+ }
+ if (isRecognizedQuery(getQueryMap(message)))
+ {
+ Map<String, String> queryMap = getQueryMap(message);
+ for (Entry<String, String> entry : queryMap.entrySet())
+ {
+ if (entry.getValue().equals("true"))
+ {
+
featureClassMap.get(entry.getKey()).initialize(message.getExchange().getEndpoint(),
message.getExchange().getBus());
+ }
+ else
+ {
+
featureClassMap.get(entry.getKey()).remove(message.getExchange().getEndpoint());
+ }
+ }
+ Message mout = this.createOutMessage(message);
+ mout.put(EndpointConfigsOutIntercetpor.CONFIG_RESULT, "Successfully set
feature to endpoint");
+ cleanUpOutInterceptors(mout);
+ mout.getInterceptorChain().add(configOutInteceptor);
+ message.getInterceptorChain().doInterceptStartingAt(message,
OutgoingChainInterceptor.class.getName());
+ }
+
+ }
+
+ @Override
+ protected Set<String> getAllowedMethod()
+ {
+ return httpMethods;
+ }
+
+ private boolean isRecognizedQuery(Map<String, String> map)
+ {
+ if (map.isEmpty())
+ {
+ return false;
+ }
+ for (String key : map.keySet())
+ {
+ if (!featureClassMap.containsKey(key) ||
!("true").toLowerCase().equals(map.get(key)) &&
!("false").toLowerCase().equals(map.get(key)))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+}
Property changes on:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointFeaturePutInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableFeature.java
===================================================================
---
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableFeature.java
(rev 0)
+++
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableFeature.java 2015-04-07
08:47:00 UTC (rev 19624)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.interceptor.util;
+
+import java.util.List;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.message.Message;
+
+/**
+ * Abstract feature to initialize and remove the added interceptors by cxf's
AbstractFeature
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ *
+ */
+public abstract class RemovableFeature
+{
+ private AbstractFeature cxfFeature;
+
+ public RemovableFeature(AbstractFeature feature)
+ {
+ cxfFeature = feature;
+ }
+
+ public void initialize(Endpoint endpoint, Bus bus)
+ {
+ cxfFeature.initialize(endpoint, bus);
+ }
+
+ public abstract void remove(Endpoint endpoint);
+
+
+ public void removeInterceptor(final List<Interceptor<? extends Message>>
interceptors, final Class<? extends Interceptor<? extends Message>>
interceptorClass) {
+ for (int i = 0; i < interceptors.size(); i++)
+ {
+ if (interceptorClass.isInstance(interceptors.get(i)))
+ {
+ interceptors.remove(i);
+ }
+ }
+ }
+
+}
Property changes on:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableFeature.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableGZIPFeature.java
===================================================================
---
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableGZIPFeature.java
(rev 0)
+++
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableGZIPFeature.java 2015-04-07
08:47:00 UTC (rev 19624)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.interceptor.util;
+
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.transport.common.gzip.GZIPInInterceptor;
+import org.apache.cxf.transport.common.gzip.GZIPOutInterceptor;
+
+/**
+ * Add and remove GZIP interceptors provided by GZIPFeature
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ *
+ */
+public class RemovableGZIPFeature extends RemovableFeature
+{
+
+ public RemovableGZIPFeature(AbstractFeature feature)
+ {
+ super(feature);
+ }
+
+ @Override
+ public void remove(Endpoint endpoint)
+ {
+ removeInterceptor(endpoint.getInInterceptors(), GZIPInInterceptor.class);
+ removeInterceptor(endpoint.getInFaultInterceptors(), GZIPInInterceptor.class);
+ removeInterceptor(endpoint.getOutInterceptors(), GZIPOutInterceptor.class);
+ removeInterceptor(endpoint.getOutFaultInterceptors(), GZIPOutInterceptor.class);
+ }
+
+}
Property changes on:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableGZIPFeature.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableLoggingFeature.java
===================================================================
---
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableLoggingFeature.java
(rev 0)
+++
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableLoggingFeature.java 2015-04-07
08:47:00 UTC (rev 19624)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.interceptor.util;
+
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+
+/**
+ * Class to add or remove interceptors provided by LoggingFeature
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ *
+ */
+public class RemovableLoggingFeature extends RemovableFeature
+{
+ public RemovableLoggingFeature(AbstractFeature feature)
+ {
+ super(feature);
+
+ }
+
+ public void remove(Endpoint endpoint)
+ {
+ removeInterceptor(endpoint.getInInterceptors(), LoggingInInterceptor.class);
+ removeInterceptor(endpoint.getInFaultInterceptors(), LoggingInInterceptor.class);
+ removeInterceptor(endpoint.getOutInterceptors(), LoggingOutInterceptor.class);
+ removeInterceptor(endpoint.getOutFaultInterceptors(),
LoggingOutInterceptor.class);
+ }
+
+}
Property changes on:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/RemovableLoggingFeature.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native