org.crsh.text
Class ScreenContextConsumer

java.lang.Object
  extended by 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.


Field Summary
private  LinkedList<Object> buffer
          Buffers objects of the same kind.
private  RenderAppendable out
          .
private  Renderer renderable
          .
 
Constructor Summary
ScreenContextConsumer(ScreenContext out)
           
 
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
 

Field Detail

buffer

private final LinkedList<Object> buffer
Buffers objects of the same kind.


renderable

private Renderer renderable
.


out

private final RenderAppendable out
.

Constructor Detail

ScreenContextConsumer

public ScreenContextConsumer(ScreenContext out)
Method Detail

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.