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

        {
            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

    }

    @Override
    protected TNonblockingSocket acceptImpl() throws TTransportException
    {
        TNonblockingSocket tsocket = super.acceptImpl();
        if (tsocket == null || tsocket.getSocketChannel() == null)
            return tsocket;
        Socket socket = tsocket.getSocketChannel().socket();
        try
        {
            socket.setKeepAlive(this.keepAlive);
        }
        catch (SocketException se)
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

    }

    @Override
    protected void beforeInvoke(Message buffer)
    {
        TNonblockingSocket socket = (TNonblockingSocket) buffer.transport;
        ThriftSessionManager.instance.setCurrentSocket(socket.getSocketChannel().socket().getRemoteSocketAddress());
    }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingSocket

        ThriftSessionManager.instance.setCurrentSocket(socket.getSocketChannel().socket().getRemoteSocketAddress());
    }

    public void beforeClose(Message buffer)
    {
        TNonblockingSocket socket = (TNonblockingSocket) buffer.transport;
        ThriftSessionManager.instance.connectionComplete(socket.getSocketChannel().socket().getRemoteSocketAddress());
    }
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

            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

    }

    @Override
    protected boolean requestInvoke(FrameBuffer frameBuffer)
    {
        TNonblockingSocket socket = (TNonblockingSocket)((CustomFrameBuffer)frameBuffer).getTransport();
        ThriftSessionManager.instance.setCurrentSocket(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.