public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractEndPoint(org.eclipse.jetty.util.thread.Scheduler scheduler) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkFill() |
void |
checkFlush() |
void |
close()
Close any backing stream associated with the endpoint
|
protected void |
close(Throwable failure) |
protected void |
doClose() |
protected void |
doShutdownInput() |
protected void |
doShutdownOutput() |
void |
fillInterested(org.eclipse.jetty.util.Callback callback)
Requests callback methods to be invoked when a call to
EndPoint.fill(ByteBuffer) would return data or EOF. |
Connection |
getConnection() |
long |
getCreatedTimeStamp() |
FillInterest |
getFillInterest() |
protected WriteFlusher |
getWriteFlusher() |
boolean |
isFillInterested() |
boolean |
isInputShutdown()
Test if the input is shutdown.
|
boolean |
isOpen()
This abstract method should be called to check if idle timeouts
should still be checked.
|
boolean |
isOptimizedForDirectBuffers()
Is the endpoint optimized for DirectBuffer usage
|
boolean |
isOutputShutdown()
Test if output is shutdown.
|
protected abstract void |
needsFillInterest() |
void |
onClose()
Callback method invoked when this
EndPoint is close. |
protected void |
onClose(Throwable failure) |
protected void |
onIdleExpired(TimeoutException timeout)
This abstract method is called when the idle timeout has expired.
|
protected abstract void |
onIncompleteFlush() |
void |
onOpen()
Callback method invoked when this
EndPoint is opened. |
protected void |
reset() |
void |
setConnection(Connection connection) |
protected void |
shutdownInput() |
void |
shutdownOutput()
Shutdown the output.
|
String |
toConnectionString() |
String |
toEndPointString() |
String |
toString() |
boolean |
tryFillInterested(org.eclipse.jetty.util.Callback callback)
Requests callback methods to be invoked when a call to
EndPoint.fill(ByteBuffer) would return data or EOF. |
void |
upgrade(Connection newConnection)
Upgrade connections.
|
void |
write(org.eclipse.jetty.util.Callback callback,
ByteBuffer... buffers)
Writes the given buffers via
EndPoint.flush(ByteBuffer...) and invokes callback methods when either
all the data has been flushed or an error occurs. |
checkIdleTimeout, getIdleFor, getIdleTimeout, getIdleTimestamp, getScheduler, notIdle, setIdleTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfill, flush, getIdleTimeout, getLocalAddress, getRemoteAddress, getTransport, setIdleTimeoutprotected AbstractEndPoint(org.eclipse.jetty.util.thread.Scheduler scheduler)
protected final void shutdownInput()
public final void shutdownOutput()
EndPointThis call indicates that no more data will be sent on this endpoint that that the remote end should read an EOF once all previously sent data has been consumed. Shutdown may be done either at the TCP/IP level, as a protocol exchange (Eg TLS close handshake) or both.
If the endpoint has EndPoint.isInputShutdown() true, then this call has the same effect
as EndPoint.close().
shutdownOutput 在接口中 EndPointpublic final void close()
EndPointprotected final void close(Throwable failure)
protected void doShutdownInput()
protected void doShutdownOutput()
protected void doClose()
protected void onClose(Throwable failure)
public boolean isOutputShutdown()
EndPointEndPoint.shutdownOutput()
or EndPoint.close().isOutputShutdown 在接口中 EndPointpublic boolean isInputShutdown()
EndPointEndPoint.fill(ByteBuffer). Once the input is shutdown, all calls to
EndPoint.fill(ByteBuffer) will return -1, until such time as the
end point is close, when they will return EofException.isInputShutdown 在接口中 EndPointpublic boolean isOpen()
IdleTimeoutisOpen 在接口中 EndPointisOpen 在类中 IdleTimeoutpublic void checkFlush()
throws IOException
IOExceptionpublic void checkFill()
throws IOException
IOExceptionpublic long getCreatedTimeStamp()
getCreatedTimeStamp 在接口中 EndPointpublic Connection getConnection()
getConnection 在接口中 EndPointConnection associated with this EndPointEndPoint.setConnection(Connection)public void setConnection(Connection connection)
setConnection 在接口中 EndPointconnection - the Connection associated with this EndPointEndPoint.getConnection(),
EndPoint.upgrade(Connection)public boolean isOptimizedForDirectBuffers()
EndPointisOptimizedForDirectBuffers 在接口中 EndPointprotected void reset()
public void onOpen()
EndPointCallback method invoked when this EndPoint is opened.
onOpen 在接口中 EndPointonOpen 在类中 IdleTimeoutEndPoint.onClose()public void onClose()
EndPointCallback method invoked when this EndPoint is close.
onClose 在接口中 EndPointonClose 在类中 IdleTimeoutEndPoint.onOpen()public void fillInterested(org.eclipse.jetty.util.Callback callback)
EndPointRequests callback methods to be invoked when a call to EndPoint.fill(ByteBuffer) would return data or EOF.
fillInterested 在接口中 EndPointcallback - the callback to call when an error occurs or we are readable.public boolean tryFillInterested(org.eclipse.jetty.util.Callback callback)
EndPointRequests callback methods to be invoked when a call to EndPoint.fill(ByteBuffer) would return data or EOF.
tryFillInterested 在接口中 EndPointcallback - the callback to call when an error occurs or we are readable.public boolean isFillInterested()
isFillInterested 在接口中 EndPointEndPoint.fillInterested(Callback) has been called, but EndPoint.fill(ByteBuffer) has not yet
been calledpublic void write(org.eclipse.jetty.util.Callback callback,
ByteBuffer... buffers)
throws IllegalStateException
EndPointWrites the given buffers via EndPoint.flush(ByteBuffer...) and invokes callback methods when either
all the data has been flushed or an error occurs.
write 在接口中 EndPointcallback - the callback to call when an error occurs or the write completed.buffers - one or more ByteBuffers that will be flushed.WritePendingException - if another write operation is concurrent.IllegalStateExceptionprotected abstract void onIncompleteFlush()
protected abstract void needsFillInterest()
throws IOException
IOExceptionpublic FillInterest getFillInterest()
protected WriteFlusher getWriteFlusher()
protected void onIdleExpired(TimeoutException timeout)
IdleTimeoutonIdleExpired 在类中 IdleTimeouttimeout - a TimeoutExceptionpublic void upgrade(Connection newConnection)
EndPointConnection.UpgradeFrom then
a prefilled buffer is requested and passed to the newConnection if it is an instance
of Connection.UpgradeTopublic String toEndPointString()
public String toConnectionString()
Copyright © 2017. All rights reserved.