com.sun.xml.ws.xmlfilter
Class EnhancedXmlStreamWriterProxy

java.lang.Object
  extended by com.sun.xml.ws.xmlfilter.EnhancedXmlStreamWriterProxy
All Implemented Interfaces:
InvocationHandler

public final class EnhancedXmlStreamWriterProxy
extends Object
implements InvocationHandler

The class provides an implementation of an InvocationHandler interface that handles requests of XMLStreamWriter proxy instances.

This InvocationHandler implementation adds additional feature or enhancement to the underlying XMLStreamWriter instance. The new enhancement or feature is defined by an InvocationProcessor implementation.

The class also contains a static factory method for creating such 'enhanced' XMLStreamWriter proxies.

Author:
Marek Potociar (marek.potociar at sun.com)

Method Summary
static XMLStreamWriter createProxy(XMLStreamWriter writer, InvocationProcessorFactory processorFactory)
          Creates a wrapper XMLStreamWriter proxy that adds enhanced feature to the writer instance.
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createProxy

public static XMLStreamWriter createProxy(XMLStreamWriter writer,
                                          InvocationProcessorFactory processorFactory)
                                   throws XMLStreamException
Creates a wrapper XMLStreamWriter proxy that adds enhanced feature to the writer instance.

Parameters:
writer - XMLStreamWriter instance that should be enhanced with content filtering feature.
processorFactory - InvocationProcessorFactory instance that is used to create InvocationProcessor which implements new enhancement or feature.
Returns:
new enhanced {XMLStreamWriter} (proxy) instance
Throws:
XMLStreamException - in case of any problems with creating the proxy

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.