Package com.davfx.ninio.common

Examples of com.davfx.ninio.common.ReadyConnection


    q.post(new Runnable() {
      @Override
      public void run() {
        ByteBufferAllocator allocator = new OnceByteBufferAllocator();
        Ready ready = readyFactory.create(q, allocator);
        ready.connect(a, new ReadyConnection() {
          private TelnetResponseReader reader = null;
          @Override
          public void handle(Address address, ByteBuffer buffer) {
            reader.handle(address, buffer);
          }
View Full Code Here


      @Override
      public void run() {
        ByteBufferAllocator allocator = new OnceByteBufferAllocator();
        Ready ready = rf.create(q, allocator);
       
        ready.connect(a, new ReadyConnection() {
          private final InstanceMapper instanceMapper = new InstanceMapper();

          @Override
          public void handle(Address address, ByteBuffer buffer) {
            ByteBuffer bb = buffer.duplicate();
View Full Code Here

          }
          if (readyFactory != null) {
            client.override(readyFactory);
          }
 
          client.connect(new ReadyConnection() {
            @Override
            public void failed(IOException e) {
              LOGGER.error("Failed", e);
              clientHandler.close();
            }
View Full Code Here

      @Override
      public void run() {
        ByteBufferAllocator allocator = new OnceByteBufferAllocator();
        Ready ready = readyFactory.create(q, allocator);
       
        ready.connect(a, new ReadyConnection() {
          private final InstanceMapper instanceMapper = new InstanceMapper();

          @Override
          public void handle(Address address, ByteBuffer buffer) {
            int instanceId;
View Full Code Here

    client.override(readyFactory);
    return this;
  }
 
  public void get(String filePath, final FailableCloseableByteBufferHandler handler) {
    client.exec("scp -f " + filePath.replace(" ", "\\ ")).connect(new ReadyConnection() {
      private CloseableByteBufferHandler write;
      private long size = -1L;
      private long count = 0L;
      private boolean closed = false;
     
View Full Code Here

      }
    });
  }
 
  public void put(final String filePath, final long fileSize, final ReadyConnection in) {
    client.exec("scp -t " + filePath.replace(" ", "\\ ")).connect(new ReadyConnection() {
      private CloseableByteBufferHandler write;
      private int countAck = 0;
     
      @Override
      public void failed(IOException e) {
View Full Code Here

  }
 
  private static final int BUFFER_SIZE = 10 * 1024;
 
  public void put(String filePath, final File source, final Failable end) {
    put(filePath, source.length(), new ReadyConnection() {
      @Override
      public void failed(IOException e) {
        end.failed(e);
      }
      @Override
View Full Code Here

    q.post(new Runnable() {
      @Override
      public void run() {
        ByteBufferAllocator allocator = new OnceByteBufferAllocator();
        Ready ready = readyFactory.create(q, allocator);
        ready.connect(a, new ReadyConnection() {
          private void closeAll() {
            if (shouldCloseQueue) {
              q.close();
            }
          }
View Full Code Here

        if (request.isSecure()) {
          ready = secureReadyFactory.create(queue, new OnceByteBufferAllocator());
        } else {
          ready = readyFactory.create(queue, new OnceByteBufferAllocator());
        }
        ready.connect(request.getAddress(), new ReadyConnection() {
          private HttpResponseReader.RecyclingHandler recyclingHandler;
          @Override
          public void handle(Address address, ByteBuffer buffer) {
            if (newRecycler.reader == null) {
              return;
View Full Code Here

    q.post(new Runnable() {
      @Override
      public void run() {
        final ByteBufferAllocator allocator = new OnceByteBufferAllocator();
        Ready ready = readyFactory.create(q, allocator);
        ready.connect(a, new ReadyConnection() {
          private FtpResponseReader reader = null;
          @Override
          public void handle(Address address, ByteBuffer buffer) {
            reader.handle(address, buffer);
          }
View Full Code Here

TOP

Related Classes of com.davfx.ninio.common.ReadyConnection

Copyright © 2018 www.massapicom. 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.