Toggle navigation
Home
org.apache.tomcat.util.net.SocketWrapperBase<org.apache.tomcat.util.net.Nio2Channel> to java.nio.ByteBuffer
No. of Instances - 1
No. of Commits - 1
No. of Projects - {'tomcat'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Internal -> Jdk
Mapping:
Cascading Type Change (Similar)
CompletionHandler<Integer,SocketWrapperBase<Nio2Channel>>
to
CompletionHandler<Integer,ByteBuffer>
Update Anonymous class
{ @Override public void completed( Integer nBytes, SocketWrapperBase<Nio2Channel> attachment){ boolean notify=false; if (log.isDebugEnabled()) { log.debug("Socket: [" + attachment + "], Interest: ["+ readInterest+ "]"); } synchronized (readCompletionHandler) { if (nBytes.intValue() < 0) { failed(new EOFException(),attachment); } else { if (readInterest && !Nio2Endpoint.isInline()) { readInterest=false; notify=true; } else { readPending.release(); } } } if (notify) { getEndpoint().processSocket(attachment,SocketEvent.OPEN_READ,false); } } @Override public void failed( Throwable exc, SocketWrapperBase<Nio2Channel> attachment){ IOException ioe; if (exc instanceof IOException) { ioe=(IOException)exc; } else { ioe=new IOException(exc); } setError(ioe); if (exc instanceof AsynchronousCloseException) { readPending.release(); return; } getEndpoint().processSocket(attachment,SocketEvent.ERROR,true); } }
to
{ @Override public void completed( Integer nBytes, ByteBuffer attachment){ boolean notify=false; if (log.isDebugEnabled()) { log.debug("Socket: [" + Nio2SocketWrapper.this + "], Interest: ["+ readInterest+ "]"); } synchronized (readCompletionHandler) { if (nBytes.intValue() < 0) { failed(new EOFException(),attachment); } else { if (readInterest && !Nio2Endpoint.isInline()) { readInterest=false; notify=true; } else { readPending.release(); } } } if (notify) { getEndpoint().processSocket(Nio2SocketWrapper.this,SocketEvent.OPEN_READ,false); } } @Override public void failed( Throwable exc, ByteBuffer attachment){ IOException ioe; if (exc instanceof IOException) { ioe=(IOException)exc; } else { ioe=new IOException(exc); } setError(ioe); if (exc instanceof AsynchronousCloseException) { readPending.release(); return; } getEndpoint().processSocket(Nio2SocketWrapper.this,SocketEvent.ERROR,true); } }