org.crsh.stream
Interface Consumer<C>
- Type Parameters:
C
- the consumed element generic type
- All Known Subinterfaces:
- CommandContext<P>, Filter<C,P,CONS>, InvocationContext<P>
- All Known Implementing Classes:
- AbstractInvocationContext, BaseCommandMatch.BaseInvoker, ClosureInvoker, CommandInvoker, CommandInvokerAdapter, CRaSHProcessContext, InvocationContextImpl, Pipe, PipeLine, PipeLineInvocationContext, ScreenContextConsumer
-
public interface Consumer<C>
Defines the interface for a consumer.
Method Summary |
void |
flush()
Flush the stream. |
Class<C> |
getConsumedType()
Returns the class of the element generic type. |
void |
provide(C element)
Provide an element. |
provide
void provide(C element)
throws Exception
-
Provide an element.
-
- Parameters:
element
- the provided element
- Throws:
Exception
- any exception
flush
void flush()
throws IOException
-
Flush the stream.
-
- Throws:
IOException
- any io exception
getConsumedType
Class<C> getConsumedType()
-
Returns the class of the element generic type.
-
- Returns:
- the consumed type
Copyright © 2015 eXo Platform SAS. All Rights Reserved.