class PacketWritestream extends WriteStream[Buffer]
A io.vertx.scala.core.streams.WriteStream for sending packets to a io.vertx.scala.core.net.SocketAddress. The stream is called when the write fails.
- Alphabetic
- By Inheritance
- PacketWritestream
- WriteStream
- StreamBase
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PacketWritestream(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asJava: AnyRef
- Definition Classes
- PacketWritestream → WriteStream → StreamBase
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
drainHandler(handler: Handler[Unit]): PacketWritestream
Set a drain handler on the stream.
Set a drain handler on the stream. If the write queue is full, then the handler will be called when the write queue is ready to accept buffers again. See io.vertx.scala.core.streams.Pump for an example of this being used.
The stream implementation defines when the drain handler, for example it could be when the queue size has been reduced to
maxSize / 2.- handler
the handler
- returns
a reference to this, so the API can be used fluently
- Definition Classes
- PacketWritestream → WriteStream
-
def
end(): Unit
Ends the stream.
Ends the stream.
Once the stream has ended, it cannot be used any more.
- Definition Classes
- PacketWritestream → WriteStream
-
def
end(t: Buffer): Unit
Same as io.vertx.scala.core.streams.WriteStream#end but writes some data to the stream before ending.
Same as io.vertx.scala.core.streams.WriteStream#end but writes some data to the stream before ending.
- Definition Classes
- PacketWritestream → WriteStream
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exceptionHandler(handler: Handler[Throwable]): PacketWritestream
Set an exception handler on the write stream.
Set an exception handler on the write stream.
- handler
the exception handler
- returns
a reference to this, so the API can be used fluently
- Definition Classes
- PacketWritestream → WriteStream → StreamBase
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
setWriteQueueMaxSize(maxSize: Int): PacketWritestream
Set the maximum size of the write queue to
maxSize.Set the maximum size of the write queue to
maxSize. You will still be able to write to the stream even if there is more thanmaxSizeitems in the write queue. This is used as an indicator by classes such asPumpto provide flow control.The value is defined by the implementation of the stream, e.g in bytes for a io.vertx.scala.core.net.NetSocket, the number of io.vertx.scala.core.eventbus.Message for a io.vertx.scala.core.eventbus.MessageProducer, etc...
- maxSize
the max size of the write stream
- returns
a reference to this, so the API can be used fluently
- Definition Classes
- PacketWritestream → WriteStream
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
write(data: Buffer): PacketWritestream
Write some data to the stream.
Write some data to the stream. The data is put on an internal write queue, and the write actually happens asynchronously. To avoid running out of memory by putting too much on the write queue, check the io.vertx.scala.core.streams.WriteStream#writeQueueFull method before writing. This is done automatically if using a io.vertx.scala.core.streams.Pump.
- data
the data to write
- returns
a reference to this, so the API can be used fluently
- Definition Classes
- PacketWritestream → WriteStream
-
def
writeQueueFull(): Boolean
This will return
trueif there are more bytes in the write queue than the value set using io.vertx.scala.core.datagram.PacketWritestream#setWriteQueueMaxSizeThis will return
trueif there are more bytes in the write queue than the value set using io.vertx.scala.core.datagram.PacketWritestream#setWriteQueueMaxSize- returns
true if write queue is full
- Definition Classes
- PacketWritestream → WriteStream