Examples of TNonblockingSocket


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

    }

    @Override
    protected TNonblockingSocket acceptImpl() throws TTransportException
    {
        TNonblockingSocket tsocket = super.acceptImpl();
        if (tsocket == null || tsocket.getSocketChannel() == null)
            return tsocket;
        Socket socket = tsocket.getSocketChannel().socket();
        // Any existing connection we had from this remote socket must be done now, so reset it
        ThriftSessionManager.instance.connectionComplete(socket.getRemoteSocketAddress());
        try
        {
            socket.setKeepAlive(this.keepAlive);
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

            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

    }

    @Override
    protected boolean requestInvoke(FrameBuffer frameBuffer)
    {
        TNonblockingSocket socket = (TNonblockingSocket) frameBuffer.trans_;
        ThriftSessionManager.instance.setCurrentSocket(socket.getSocketChannel().socket().getRemoteSocketAddress());
        frameBuffer.invoke();
        return true;
    }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

        TSchedulingRequest req = new TSchedulingRequest();
        req.setApp("testApp");
        req.setTasks(tasks);
        req.setUser(user);

        TNonblockingTransport tr = new TNonblockingSocket(
            "localhost", schedulerPort);
        SchedulerService.AsyncClient client = new SchedulerService.AsyncClient(
            factory, manager, tr);
        //client.registerFrontend("testApp", new RegisterCallback());
        client.submitJob(req, new SubmitCallback(req, tr));
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

      transports.remove(client);
    }

    @Override
    public T makeObject(InetSocketAddress socket) throws Exception {
      TNonblockingTransport nbTr = new TNonblockingSocket(
          socket.getAddress().getHostAddress(), socket.getPort());
      TProtocolFactory factory = new TBinaryProtocol.Factory();
      T client = maker.create(nbTr, clientManager, factory);
      transports.put(client, nbTr);
      return client;
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

            this.thread = thread;
        }

        public void run()
        {
            TNonblockingSocket socket = (TNonblockingSocket) frameBuffer.trans_;
            SocketSessionManagementService.remoteSocket.set(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

    }

    @Override
    protected TNonblockingSocket acceptImpl() throws TTransportException
    {
        TNonblockingSocket tsocket = super.acceptImpl();
        if (tsocket == null || tsocket.getSocketChannel() == null)
            return tsocket;
        Socket socket = tsocket.getSocketChannel().socket();
        // clean up the old information.
        SocketSessionManagementService.instance.remove(socket.getRemoteSocketAddress());
        try
        {
            socket.setKeepAlive(this.keepAlive);
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

    }

    @Override
    protected boolean requestInvoke(FrameBuffer frameBuffer)
    {
        TNonblockingSocket socket = (TNonblockingSocket) frameBuffer.trans_;
        SocketSessionManagementService.remoteSocket.set(socket.getSocketChannel().socket().getRemoteSocketAddress());
        frameBuffer.invoke();
        return true;
    }
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.