implicit final class InterfaceExtensions[T <: Interface] extends AnyVal
- Alphabetic
- By Inheritance
- InterfaceExtensions
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new InterfaceExtensions(readline: T)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def onClose(callback: () => Any): T
Emitted when close() is called.
Emitted when close() is called. Also emitted when the input stream receives its 'end' event. The Interface instance should be considered "finished" once this is emitted. For example, when the input stream receives
^D
, respectively known as EOT.
^D }}}
- Annotations
- @inline()
- def onLine(callback: (String) => Any): T
Emitted whenever the input stream receives an end of line (\n, \r, or \r\n), usually received when the user hits enter, or return.
Emitted whenever the input stream receives an end of line (\n, \r, or \r\n), usually received when the user hits enter, or return. This is a good hook to listen for user input.
- Annotations
- @inline()
- def onPause(callback: () => Any): T
Emitted whenever the input stream is paused.
Emitted whenever the input stream is paused. Also emitted whenever the input stream is not paused and receives the SIGCONT event. (See events SIGTSTP and SIGCONT)
- Annotations
- @inline()
- def onResume(callback: () => Any): T
Emitted whenever the input stream is resumed.
Emitted whenever the input stream is resumed.
- Annotations
- @inline()
- def onSIGCONT(callback: () => Any): T
Emitted whenever the input stream is sent to the background with
Emitted whenever the input stream is sent to the background with
^Z
, respectively known as SIGTSTP, and then continued with fg(1). This event only emits if the stream was not paused before sending the program to the background.
^Z }}} and then continued with fg(1). This event only emits if the stream was not paused before sending the program to the background.
- Annotations
- @inline()
- def onSIGINT(callback: () => Any): T
Emitted whenever the input stream receives a
Emitted whenever the input stream receives a
^C
, respectively known as SIGINT. If there is no SIGINT event listener present when the input stream receives a SIGINT, pause will be triggered.
^C }}} SIGINT event listener present when the input stream receives a SIGINT, pause will be triggered.
- Annotations
- @inline()
- def onSIGTSTP(callback: () => Any): T
Emitted whenever the input stream receives a
Emitted whenever the input stream receives a
^Z
, respectively known as SIGTSTP. If there is no SIGTSTP event listener present when the input stream receives a SIGTSTP, the program will be sent to the background. When the program is resumed with fg, the 'pause' and SIGCONT events will be emitted. You can use either to resume the stream. The 'pause' and SIGCONT events will not be triggered if the stream was paused before the program was sent to the background.
^Z }}} SIGTSTP event listener present when the input stream receives a SIGTSTP, the program will be sent to the background. When the program is resumed with fg, the 'pause' and SIGCONT events will be emitted. You can use either to resume the stream. The 'pause' and SIGCONT events will not be triggered if the stream was paused before the program was sent to the background.
- Annotations
- @inline()
- def toString(): String
- Definition Classes
- Any