org.crsh.shell.impl.command
Class PipeFilter.Sink<P>
java.lang.Object
org.crsh.shell.impl.command.PipeFilter<Object,P>
org.crsh.shell.impl.command.PipeFilter.Sink<P>
- All Implemented Interfaces:
- Closeable, Flushable, CommandContext<Object>, RuntimeContext, Consumer<Object>, Filter<Object,P,CommandContext<P>>, Producer<P,CommandContext<P>>, InteractionContext<Object>, ScreenContext<Object>
- Enclosing class:
- PipeFilter<C,P>
-
static class PipeFilter.Sink<P>
- extends PipeFilter<Object,P>
-
Method Summary |
void |
close()
Close the producer. |
void |
flush()
|
Class<Object> |
getConsumedType()
Returns the class of the element generic type. |
Class<P> |
getProducedType()
Returns the class of the produced type. |
void |
open(CommandContext<P> consumer)
Open the producer with the specified consumer. |
void |
provide(Object element)
Provide an element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
producedType
private final Class<P> producedType
-
.
PipeFilter.Sink
PipeFilter.Sink(Class<P> producedType,
boolean piped)
getProducedType
public Class<P> getProducedType()
- Description copied from interface:
Producer
-
Returns the class of the produced type.
-
- Returns:
- the produced type
open
public void open(CommandContext<P> consumer)
- Description copied from interface:
Producer
-
Open the producer with the specified consumer.
-
- Parameters:
consumer
- the consumer
provide
public void provide(Object element)
throws IOException
- Description copied from interface:
Consumer
-
Provide an element.
-
- Parameters:
element
- the provided element
- Throws:
IOException
getConsumedType
public Class<Object> getConsumedType()
- Description copied from interface:
Consumer
-
Returns the class of the element generic type.
-
- Returns:
- the consumed type
flush
public void flush()
throws IOException
-
- Throws:
IOException
close
public void close()
throws IOException
- Description copied from interface:
Producer
-
Close the producer.
-
- Throws:
IOException
Copyright © 2014 eXo Platform SAS. All Rights Reserved.