org.jboss.remoting.stream
Interface ObjectSink<T>

Type Parameters:
T - the object type
All Superinterfaces:
Closeable, Flushable

public interface ObjectSink<T>
extends Flushable, Closeable

A streaming sink for objects.


Method Summary
 void accept(T instance)
          Accept an object.
 void close()
          Close the sink.
 void flush()
          Push out any temporary state.
 

Method Detail

accept

void accept(T instance)
            throws IOException
Accept an object.

Parameters:
instance - the object to accept
Throws:
IOException - if an error occurs

flush

void flush()
           throws IOException
Push out any temporary state. May be a no-op on some implementations.

Specified by:
flush in interface Flushable
Throws:
IOException - if an error occurs

close

void close()
           throws IOException
Close the sink.

Specified by:
close in interface Closeable
Throws:
IOException - if an error occurs


Copyright © 2008 JBoss, a division of Red Hat, Inc.