net.sf.asyncobjects.io
Interface BufferProvider

All Known Implementing Classes:
DefaultBufferProvider

public interface BufferProvider

A provider for NIO buffers. This class wraps buffer management functionality. The instances of this interface are expected to be used from within single vat. If the instance should be returned to the provier on the same turn where it has been got.

Author:
const

Method Summary
 ByteBuffer getByteBuffer()
           
 CharBuffer getCharBuffer()
           
 void returnByteBuffer(ByteBuffer buffer)
          Return the buffer
 void returnCharBuffer(CharBuffer buffer)
          Return the buffer
 

Method Detail

getByteBuffer

ByteBuffer getByteBuffer()
Returns:
a byte buffer

returnByteBuffer

void returnByteBuffer(ByteBuffer buffer)
Return the buffer

Parameters:
buffer - a buffer recieved with getByteBuffer()

getCharBuffer

CharBuffer getCharBuffer()
Returns:
a character buffer

returnCharBuffer

void returnCharBuffer(CharBuffer buffer)
Return the buffer

Parameters:
buffer - a buffer recieved with getCharBuffer()


Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.