Examples of MarkedByteWriteAdapter


Examples of org.jboss.errai.bus.server.util.MarkedByteWriteAdapter

  @Override
  public boolean copyFromBuffer(final MessageQueue queue,
                                final ByteWriteAdapter toAdapter) throws IOException {


    final MarkedByteWriteAdapter markedOutputStream = new MarkedByteWriteAdapter(toAdapter);

    try {
      queue.getBuffer().read(markedOutputStream, queue.getBufferColor(), new MultiMessageFilter());

      markedOutputStream.flush();

      if (markedOutputStream.dataWasWritten() && markedOutputStream.getBytesWritten() > 2) {
        queue.resetMessageCount();
        return true;
      }
    }
    catch (BufferOverflowException e) {
View Full Code Here

Examples of org.jboss.errai.bus.server.util.MarkedByteWriteAdapter

  }

  @Override
  public boolean copyFromBuffer(TimeUnit timeUnit, int timeout, MessageQueue queue, ByteWriteAdapter toAdapter)
      throws IOException {
    final MarkedByteWriteAdapter markedOutputStream = new MarkedByteWriteAdapter(toAdapter);

    try {
      queue.getBuffer().readWait(timeUnit, timeout, markedOutputStream, queue.getBufferColor(),
          new MultiMessageFilter());

      markedOutputStream.flush();

      if (markedOutputStream.dataWasWritten() && markedOutputStream.getBytesWritten() > 2) {
        queue.resetMessageCount();
        return true;
      }
    }
    catch (BufferOverflowException e) {
View Full Code Here

Examples of org.jboss.errai.bus.server.util.MarkedByteWriteAdapter

  @Override
  public boolean copyFromBuffer(final MessageQueue queue,
                                final ByteWriteAdapter toAdapter) throws IOException {


    final MarkedByteWriteAdapter markedOutputStream = new MarkedByteWriteAdapter(toAdapter);

    try {
      queue.getBuffer().read(markedOutputStream, queue.getBufferColor(), new MultiMessageFilter());
     
      if (markedOutputStream.dataWasWritten() && markedOutputStream.getBytesWritten() > 2) {
        queue.resetMessageCount();
        return true;
      }
    }
    catch (BufferOverflowException e) {
View Full Code Here

Examples of org.jboss.errai.bus.server.util.MarkedByteWriteAdapter

  }

  @Override
  public boolean copyFromBuffer(TimeUnit timeUnit, int timeout, MessageQueue queue, ByteWriteAdapter toAdapter)
      throws IOException {
    final MarkedByteWriteAdapter markedOutputStream = new MarkedByteWriteAdapter(toAdapter);

    try {
      queue.getBuffer().readWait(timeUnit, timeout, markedOutputStream, queue.getBufferColor(),
          new MultiMessageFilter());
     
      if (markedOutputStream.dataWasWritten() && markedOutputStream.getBytesWritten() > 2) {
        queue.resetMessageCount();
        return true;
      }
    }
    catch (BufferOverflowException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.