org.crsh.text
Class ScreenContextConsumer
java.lang.Object
org.crsh.text.ScreenContextConsumer
- All Implemented Interfaces:
- Consumer<Object>
-
public class ScreenContextConsumer
- extends Object
-
- implements Consumer<Object>
-
A Consumer<Object>
that renders the object stream to a ScreenContext
.
Method Summary |
void |
flush()
Flush the stream. |
Class<Object> |
getConsumedType()
Returns the class of the element generic type. |
void |
provide(Object element)
Provide an element. |
void |
send()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
private final LinkedList<Object> buffer
-
Buffers objects of the same kind.
renderable
private Renderer renderable
-
.
out
private final RenderAppendable out
-
.
ScreenContextConsumer
public ScreenContextConsumer(ScreenContext out)
getConsumedType
public Class<Object> getConsumedType()
- Description copied from interface:
Consumer
-
Returns the class of the element generic type.
-
- Specified by:
getConsumedType
in interface Consumer<Object>
-
- Returns:
- the consumed type
provide
public void provide(Object element)
throws IOException
- Description copied from interface:
Consumer
-
Provide an element.
-
- Specified by:
provide
in interface Consumer<Object>
-
- Parameters:
element
- the provided element
- Throws:
IOException
flush
public void flush()
throws IOException
- Description copied from interface:
Consumer
-
Flush the stream.
-
- Specified by:
flush
in interface Consumer<Object>
-
- Throws:
IOException
- any io exception
send
public void send()
throws IOException
-
-
- Throws:
IOException
Copyright © 2015 eXo Platform SAS. All Rights Reserved.