class GenericTransportBuffer implements TransportBuffer {

  @Override
  public boolean add(InternalEvent ievent) throws IllegalStateException, IOException {
    if (batchSize >= maxBatchSize) {
      throw new IllegalStateException("max batch size was hit");
    }

    os.write(serializer.serialize(ievent));

    batchSize++;
    return true;
  }

  public  GenericTransportBuffer(long maxBatchSize, boolean useCompression,
      TransportSerializer serializer);

}