Class BlockingWriteCallback.WriteBlocker
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.BlockingWriteCallback.WriteBlocker
-
- All Implemented Interfaces:
java.lang.AutoCloseable,Callback,Invocable,WriteCallback
- Enclosing class:
- BlockingWriteCallback
public static class BlockingWriteCallback.WriteBlocker extends java.lang.Object implements WriteCallback, Callback, java.lang.AutoCloseable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Callback
Callback.Completable, Callback.Completing, Callback.Nested
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
Invocable.InvocationType
-
-
Field Summary
-
Fields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWriteBlocker(SharedBlockingCallback.Blocker blocker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidblock()voidclose()voidfailed(java.lang.Throwable x)Callback invoked when the operation fails.Invocable.InvocationTypegetInvocationType()voidsucceeded()Callback invoked when the operation completes.voidwriteFailed(java.lang.Throwable x)Callback invoked when the write fails.voidwriteSuccess()Callback invoked when the write completes.
-
-
-
Constructor Detail
-
WriteBlocker
protected WriteBlocker(SharedBlockingCallback.Blocker blocker)
-
-
Method Detail
-
getInvocationType
public Invocable.InvocationType getInvocationType()
- Specified by:
getInvocationTypein interfaceInvocable- Returns:
- The InvocationType of this object
-
writeFailed
public void writeFailed(java.lang.Throwable x)
Description copied from interface:WriteCallbackCallback invoked when the write fails.
- Specified by:
writeFailedin interfaceWriteCallback- Parameters:
x- the reason for the write failure
-
writeSuccess
public void writeSuccess()
Description copied from interface:WriteCallbackCallback invoked when the write completes.
- Specified by:
writeSuccessin interfaceWriteCallback- See Also:
WriteCallback.writeFailed(Throwable)
-
succeeded
public void succeeded()
Description copied from interface:CallbackCallback invoked when the operation completes.
- Specified by:
succeededin interfaceCallback- See Also:
Callback.failed(Throwable)
-
failed
public void failed(java.lang.Throwable x)
Description copied from interface:CallbackCallback invoked when the operation fails.
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
block
public void block() throws java.io.IOException- Throws:
java.io.IOException
-
-