@Override public boolean isReady() { return ib.isReady(); }
@Override public boolean isReady() { return ib.isReady(); }
@Override public boolean isReady() { return ib.isReady(); }
public boolean isReady() { if (ib == null) { throw new IllegalStateException(rb.getString(LogFacade.OBJECT_INVALID_SCOPE_EXCEPTION)); } return ib.isReady(); }
private void checkNonBlockingRead() { if (!ib.isBlocking() && !ib.isReady()) { throw new IllegalStateException(sm.getString("coyoteInputStream.nbNotready")); } }
private void checkNonBlockingRead() { if (!ib.isBlocking() && !ib.isReady()) { throw new IllegalStateException(sm.getString("coyoteInputStream.nbNotready")); } }
private void checkNonBlockingRead() { if (ib.isBlocking() && !ib.isReady()) { throw new IllegalStateException( sm.getString("coyoteInputStream.nbNotready")); } } }
public void setReadListener(ReadListener readListener) { if (readHandler != null) { throw new IllegalStateException(rb.getString(LogFacade.ALREADY_SET_READ_LISTENER)); } if (!(request.isAsyncStarted() || request.isUpgrade())) { throw new IllegalStateException(rb.getString(LogFacade.NON_ASYNC_UPGRADE_READER_EXCEPTION)); } readHandler = new ReadHandlerImpl(readListener); if (isReady()) { try { readHandler.onDataAvailable(); } catch(Throwable t) { log.log(Level.WARNING, LogFacade.READ_LISTENER_ON_DATA_AVAILABLE_ERROR, t); } } }
public void setReadListener(ReadListener listener) { coyoteRequest.setReadListener(listener); // The container is responsible for the first call to // listener.onDataAvailable(). If isReady() returns true, the container // needs to call listener.onDataAvailable() from a new thread. If // isReady() returns false, the socket will be registered for read and // the container will call listener.onDataAvailable() once data arrives. // Must call isFinished() first as a call to isReady() if the request // has been finished will register the socket for read interest and that // is not required. if (!coyoteRequest.isFinished() && isReady()) { coyoteRequest.action(ActionCode.DISPATCH_READ, null); } }
public void setReadListener(ReadListener listener) { coyoteRequest.setReadListener(listener); // The container is responsible for the first call to // listener.onDataAvailable(). If isReady() returns true, the container // needs to call listener.onDataAvailable() from a new thread. If // isReady() returns false, the socket will be registered for read and // the container will call listener.onDataAvailable() once data arrives. // Must call isFinished() first as a call to isReady() if the request // has been finished will register the socket for read interest and that // is not required. if (!coyoteRequest.isFinished() && isReady()) { coyoteRequest.action(ActionCode.DISPATCH_READ, null); if (!ContainerThreadMarker.isContainerThread()) { // Not on a container thread so need to execute the dispatch coyoteRequest.action(ActionCode.DISPATCH_EXECUTE, null); } } }
public void setReadListener(ReadListener listener) { coyoteRequest.setReadListener(listener); // The container is responsible for the first call to // listener.onDataAvailable(). If isReady() returns true, the container // needs to call listener.onDataAvailable() from a new thread. If // isReady() returns false, the socket will be registered for read and // the container will call listener.onDataAvailable() once data arrives. // Must call isFinished() first as a call to isReady() if the request // has been finished will register the socket for read interest and that // is not required. if (!coyoteRequest.isFinished() && isReady()) { coyoteRequest.action(ActionCode.DISPATCH_READ, null); if (!ContainerThreadMarker.isContainerThread()) { // Not on a container thread so need to execute the dispatch coyoteRequest.action(ActionCode.DISPATCH_EXECUTE, null); } } }