trait Transport[In, Out] extends Closable
A transport is a representation of a stream of objects that may be read from and written to asynchronously. Transports are connected to some endpoint, typically via a channel pipeline that performs encoding and decoding.
- Self Type
- Transport[In, Out]
- Alphabetic
- By Inheritance
- Transport
- Closable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract type Context <: TransportContext
Abstract Value Members
-
abstract
def
close(deadline: Time): Future[Unit]
- Definition Classes
- Closable
-
abstract
def
context: Context
The control panel for the Transport.
-
abstract
def
onClose: Future[Throwable]
The channel closed with the given exception.
The channel closed with the given exception. This is the same exception you would get if attempting to read or write on the Transport, but this allows clients to listen to close events.
-
abstract
def
read(): Future[Out]
Read a message from the transport.
-
abstract
def
status: Status
The status of this transport; see com.twitter.finagle.Status for status definitions.
-
abstract
def
write(req: In): Future[Unit]
Write
req
to this transport; the returned future acknowledges write completion.
Concrete 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
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
close(after: Duration): Future[Unit]
- Definition Classes
- Closable
-
final
def
close(): Future[Unit]
- Definition Classes
- Closable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[In1, Out1](f: (In1) ⇒ In, g: (Out) ⇒ Out1): Transport[In1, Out1]
Maps this transport to
Transport[In1, Out2]
.Maps this transport to
Transport[In1, Out2]
. Note, exceptions inf
andg
are lifted to a com.twitter.util.Future.- f
The function applied to
write
s input.- g
The function applied to the result of a
read
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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( ... ) @native()
Deprecated Value Members
-
final
def
localAddress: SocketAddress
The locally bound address of this transport.
The locally bound address of this transport.
- Annotations
- @deprecated
- Deprecated
(Since version 2017-08-21) Please use Transport.context.localAddress instead
-
final
def
remoteAddress: SocketAddress
The remote address to which the transport is connected.
The remote address to which the transport is connected.
- Annotations
- @deprecated
- Deprecated
(Since version 2017-08-21) Please use Transport.context.remoteAddress instead