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 protected
WriteBlocker(SharedBlockingCallback.Blocker blocker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
block()
void
close()
void
failed(java.lang.Throwable x)
Callback invoked when the operation fails.Invocable.InvocationType
getInvocationType()
void
succeeded()
Callback invoked when the operation completes.void
writeFailed(java.lang.Throwable x)
Callback invoked when the write fails.void
writeSuccess()
Callback invoked when the write completes.
-
-
-
Constructor Detail
-
WriteBlocker
protected WriteBlocker(SharedBlockingCallback.Blocker blocker)
-
-
Method Detail
-
getInvocationType
public Invocable.InvocationType getInvocationType()
- Specified by:
getInvocationType
in interfaceInvocable
- Returns:
- The InvocationType of this object
-
writeFailed
public void writeFailed(java.lang.Throwable x)
Description copied from interface:WriteCallback
Callback invoked when the write fails.
- Specified by:
writeFailed
in interfaceWriteCallback
- Parameters:
x
- the reason for the write failure
-
writeSuccess
public void writeSuccess()
Description copied from interface:WriteCallback
Callback invoked when the write completes.
- Specified by:
writeSuccess
in interfaceWriteCallback
- See Also:
WriteCallback.writeFailed(Throwable)
-
succeeded
public void succeeded()
Description copied from interface:Callback
Callback invoked when the operation completes.
- Specified by:
succeeded
in interfaceCallback
- See Also:
Callback.failed(Throwable)
-
failed
public void failed(java.lang.Throwable x)
Description copied from interface:Callback
Callback invoked when the operation fails.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
block
public void block() throws java.io.IOException
- Throws:
java.io.IOException
-
-