Examples of TNonblockingSocket


Examples of org.apache.blur.thirdparty.thrift_0_9_0.transport.TNonblockingSocket

        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
      try {
        TNonblockingSocket transport = newTransport(connection);
        client = (TAsyncClient) constructor.newInstance(new Object[] { _protocolFactory, _clientManager, transport });
        client.setTimeout(_timeout);
        counter.incrementAndGet();
        return client;
      } catch (Exception e) {
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.transport.TNonblockingSocket

      }
    }
  }

  private TNonblockingSocket newTransport(Connection connection) throws IOException {
    return new TNonblockingSocket(connection.getHost(), connection.getPort());
  }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

      }
     
      @Override
      public void run() {
        if (frameBuffer.trans_ instanceof TNonblockingSocket) {
          TNonblockingSocket tsock = (TNonblockingSocket) frameBuffer.trans_;
          Socket sock = tsock.getSocketChannel().socket();
          clientAddress.set(sock.getInetAddress().getHostAddress() + ":" + sock.getPort());
        }
        frameBuffer.invoke();
      }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

        this.frameBuffer = frameBuffer;
      }
     
      public void run() {
        if (frameBuffer.trans_ instanceof TNonblockingSocket) {
          TNonblockingSocket tsock = (TNonblockingSocket) frameBuffer.trans_;
          Socket sock = tsock.getSocketChannel().socket();
          clientAddress.set(sock.getInetAddress().getHostAddress() + ":" + sock.getPort());
        }
        frameBuffer.invoke();
      }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

      @Override
      public void run() {
        if (frameBuffer instanceof CustomNonblockingFrameBuffer) {
          TNonblockingTransport trans = ((CustomNonblockingFrameBuffer) frameBuffer).getTransport();
          if (trans instanceof TNonblockingSocket) {
            TNonblockingSocket tsock = (TNonblockingSocket) trans;
            Socket sock = tsock.getSocketChannel().socket();
            TServerUtils.clientAddress.set(sock.getInetAddress().getHostAddress() + ":" + sock.getPort());
          }
        }
        frameBuffer.invoke();
      }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

        this.frameBuffer = frameBuffer;
      }
     
      public void run() {
        if (frameBuffer.trans_ instanceof TNonblockingSocket) {
          TNonblockingSocket tsock = (TNonblockingSocket) frameBuffer.trans_;
          Socket sock = tsock.getSocketChannel().socket();
          clientAddress.set(sock.getInetAddress().getHostAddress() + ":" + sock.getPort());
        }
        frameBuffer.invoke();
      }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

            this.thread = thread;
        }

        public void run()
        {
            TNonblockingSocket socket = (TNonblockingSocket) frameBuffer.trans_;
            ThriftSessionManager.instance.setCurrentSocket(socket.getSocketChannel().socket().getRemoteSocketAddress());
            frameBuffer.invoke();
            // this is how we let the same selector thread change the selection type.
            thread.requestSelectInterestChange(frameBuffer);
        }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

        {
            FrameBuffer buffer = (FrameBuffer) key.attachment();
            if (buffer != null)
            {
                buffer.close();
                TNonblockingSocket socket = (TNonblockingSocket) buffer.trans_;
                if (socket != null)
                    ThriftSessionManager.instance.connectionComplete(socket.getSocketChannel().socket().getRemoteSocketAddress());
            }
            key.cancel();
        }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

        this.frameBuffer = frameBuffer;
      }
     
      public void run() {
        if (frameBuffer.trans_ instanceof TNonblockingSocket) {
          TNonblockingSocket tsock = (TNonblockingSocket) frameBuffer.trans_;
          Socket sock = tsock.getSocketChannel().socket();
          clientAddress.set(sock.getInetAddress().getHostAddress() + ":" + sock.getPort());
        }
        frameBuffer.invoke();
      }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

    }
    assertEquals(numThreads * numCallsPerThread, numSuccesses);
 
 
  private Srv.AsyncClient getClient() throws IOException {
    TNonblockingSocket clientSocket = new TNonblockingSocket(ServerTestBase.HOST, ServerTestBase.PORT);
    return new Srv.AsyncClient(new TBinaryProtocol.Factory(), clientManager_, clientSocket);
  }
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.