Package org.apache.tomcat.util.net.AbstractEndpoint.Handler

Examples of org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState


        }
    }

    @Override
    public SocketState asyncDispatch(SocketStatus status) {
        SocketState state = super.asyncDispatch(status);
        if (state == SocketState.OPEN && ((InternalNio2InputBuffer) inputBuffer).isPending()) {
            // Following async processing, a read is still pending, so
            // keep the processor associated
            return SocketState.LONG;
        } else {
View Full Code Here


                    if (log.isDebugEnabled()) log.debug("Error during SSL handshake",x);
                } catch (CancelledKeyException ckx) {
                    handshake = -1;
                }
                if (handshake == 0) {
                    SocketState state = SocketState.OPEN;
                    // Process the request from this socket
                    if (status == null) {
                        state = handler.process(ka, SocketStatus.OPEN_READ);
                    } else {
                        state = handler.process(ka, status);
View Full Code Here

              if (!socket.processing.compareAndSet(false, true)) {
                  log.error("Unable to process socket. Invalid state.");
                  return;
              }
             
              SocketState state = SocketState.OPEN;
              // Process the request from this socket
              if ( (!socket.isInitialized()) && (!setSocketOptions(socket.getSocket())) ) {
                  state = SocketState.CLOSED;
              }
              socket.setInitialized(true);
View Full Code Here

                        if ( log.isDebugEnabled() ) log.debug("Error during SSL handshake",x);
                    }catch ( CancelledKeyException ckx ) {
                        handshake = -1;
                    }
                    if ( handshake == 0 ) {
                        SocketState state = SocketState.OPEN;
                        // Process the request from this socket
                        if (status == null) {
                            state = handler.process(
                                    (KeyAttachment) key.attachment(),
                                    SocketStatus.OPEN);
View Full Code Here

        @Override
        public void run() {
            synchronized (socket) {
                // Process the request from this socket
                SocketState state = SocketState.OPEN;
                if (status == null) {
                    state = handler.process(socket,SocketStatus.OPEN);
                } else {
                    state = handler.process(socket, status);
                }
View Full Code Here

            // Process the request from this socket
            if (socket.getSocket() == null) {
                // Closed in another thread
                return;
            }
            SocketState state = handler.process(socket, status);
            if (state == Handler.SocketState.CLOSED) {
                // Close socket and pool
                destroySocket(socket.getSocket().longValue());
                socket.socket = null;
            } else if (state == Handler.SocketState.LONG) {
View Full Code Here

                    if (log.isDebugEnabled()) log.debug("Error during SSL handshake",x);
                } catch (CancelledKeyException ckx) {
                    handshake = -1;
                }
                if (handshake == 0) {
                    SocketState state = SocketState.OPEN;
                    // Process the request from this socket
                    if (status == null) {
                        state = handler.process(ka, SocketStatus.OPEN_READ);
                    } else {
                        state = handler.process(ka, status);
View Full Code Here

        @Override
        public void run() {
            boolean launch = false;
            synchronized (socket) {
                try {
                    SocketState state = SocketState.OPEN;
                    handler.beforeHandshake(socket);
                    try {
                        // SSL handshake
                        serverSocketFactory.handshake(socket.getSocket());
                    } catch (Throwable t) {
View Full Code Here

        @Override
        public void run() {
            boolean launch = false;
            synchronized (socket) {
                try {
                    SocketState state = SocketState.OPEN;

                    try {
                        // SSL handshake
                        serverSocketFactory.handshake(socket.getSocket());
                    } catch (Throwable t) {
View Full Code Here

                } catch (IOException x) {
                    handshake = -1;
                    if (log.isDebugEnabled()) log.debug("Error during SSL handshake",x);
                }
                if (handshake == 0) {
                    SocketState state = SocketState.OPEN;
                    // Process the request from this socket
                    if (status == null) {
                        state = handler.process(socket, SocketStatus.OPEN_READ);
                    } else {
                        state = handler.process(socket, status);
View Full Code Here

TOP

Related Classes of org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState

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.