Examples of DiscoWorkerDecoder


Examples of org.discoproject.worker.protocol.decoder.DiscoWorkerDecoder

    final DiscoWorkerListener listener = mock(DiscoWorkerListener.class);
    final InOrder inOrder = inOrder(listener);

    final Pipe pipeFromDisco = Pipe.open();
    final DiscoIOChannel ioChannel = new DiscoIOChannel(pipeFromDisco.source(), new NullByteChannel(),
            new DiscoWorkerDecoder().setListener(listener));

    final String okStr = "OK 4 \"ok\"\n";
    pipeFromDisco.sink().write(ByteBuffer.wrap(okStr.getBytes()));
    ioChannel.write(new WorkerAnnounceEncoder().set("1.0", 555));
View Full Code Here

Examples of org.discoproject.worker.protocol.decoder.DiscoWorkerDecoder

  private final FatalEncoder fatalEncoder;

  private final MessageEncoder messageEncoder;

  public DiscoWorker(final ReadableByteChannel readChannel, final WritableByteChannel writeChannel) {
    this.discoIOChannel = new DiscoIOChannel(readChannel, writeChannel, new DiscoWorkerDecoder().setListener(this));
    this.map = null;
    this.reduce = null;

    this.workerAnnounceEncoder = new WorkerAnnounceEncoder();
    this.requestTaskEncoder = new RequestTaskEncoder();
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.