Package org.apache.maven.doxia.sink.impl
Class BufferingSinkProxyFactory
java.lang.Object
org.apache.maven.doxia.sink.impl.BufferingSinkProxyFactory
- All Implemented Interfaces:
SinkWrapperFactory
Buffers all method calls on the proxied Sink until its
Sink.flush()
is called.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncastAsBufferingSink
(org.apache.maven.doxia.sink.Sink sink) org.apache.maven.doxia.sink.Sink
createWrapper
(org.apache.maven.doxia.sink.Sink delegate) By default all wrappers just delegate each method to the wrapped sink's method.int
Determines the order of sink wrappers.
-
Constructor Details
-
BufferingSinkProxyFactory
public BufferingSinkProxyFactory()
-
-
Method Details
-
createWrapper
public org.apache.maven.doxia.sink.Sink createWrapper(org.apache.maven.doxia.sink.Sink delegate) Description copied from interface:SinkWrapperFactory
By default all wrappers just delegate each method to the wrapped sink's method. For certain Sink methods the wrapper may modify the sink before/after or instead of calling the delegate's method.- Specified by:
createWrapper
in interfaceSinkWrapperFactory
- Parameters:
delegate
- the delegate- Returns:
- a new sink wrapping the given one
-
castAsBufferingSink
public static BufferingSinkProxyFactory.BufferingSink castAsBufferingSink(org.apache.maven.doxia.sink.Sink sink) -
getPriority
public int getPriority()Description copied from interface:SinkWrapperFactory
Determines the order of sink wrappers. The wrapper factory with the highest priority is called first.- Specified by:
getPriority
in interfaceSinkWrapperFactory
- Returns:
- the priority of this factory
-