Class Transport.Wrapper
- All Implemented Interfaces:
Transport
- Direct Known Subclasses:
QuicTransport
- Enclosing interface:
Transport
-
Nested Class Summary
Nested classes/interfaces inherited from interface Transport
Transport.IP, Transport.Socket, Transport.TCPIP, Transport.TCPUnix, Transport.UDPIP, Transport.UDPUnix, Transport.Unix, Transport.Wrapper -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(SocketAddress socketAddress, Map<String, Object> context) Establishes a connection to the given socket address.booleannewConnection(EndPoint endPoint, Map<String, Object> context) Creates a newConnectionto be associated with the given low-levelEndPoint.newEndPoint(Scheduler scheduler, ManagedSelector selector, SelectableChannel selectable, SelectionKey selectionKey) ForTransports that are based on sockets, or forTransports that are layered on top of anotherTransportthat is based on sockets, this method is invoked to create a newEndPointthat wraps theSelectableChannelcreated byTransport.newSelectableChannel().ForTransports that are based on sockets, or forTransports that are layered on top of anotherTransportthat is based on sockets, this method is invoked to create a newSelectableChannelused for the socket communication.booleanReturns whether thisTransportrequires resolution of domain names.toString()unwrap()
-
Constructor Details
-
Wrapper
-
-
Method Details
-
getWrapped
-
unwrap
-
isIntrinsicallySecure
public boolean isIntrinsicallySecure()- Specified by:
isIntrinsicallySecurein interfaceTransport- Returns:
- whether this
Transportis intrinsically secure.
-
requiresDomainNameResolution
public boolean requiresDomainNameResolution()Description copied from interface:TransportReturns whether this
Transportrequires resolution of domain names.When domain name resolution is required, it must be performed by an external service, and the value returned by
Transport.getSocketAddress()is ignored, while the resolved socket address is eventually passed toTransport.connect(SocketAddress, Map). Otherwise, domain name resolution is not required, and the value returned byTransport.getSocketAddress()is eventually passed toTransport.connect(SocketAddress, Map).- Specified by:
requiresDomainNameResolutionin interfaceTransport- Returns:
- whether this
Transportrequires domain names resolution
-
connect
Description copied from interface:TransportEstablishes a connection to the given socket address.
For
Transports thatrequire domain name resolution, this is the IP address resolved from the domain name. ForTransports that do not require domain name resolution (for example Unix-Domain sockets, or memory) this is the socket address to connect to. -
getSocketAddress
- Specified by:
getSocketAddressin interfaceTransport- Returns:
- the socket address to connect to in case domain name resolution is not required
-
newSelectableChannel
Description copied from interface:TransportFor
Transports that are based on sockets, or forTransports that are layered on top of anotherTransportthat is based on sockets, this method is invoked to create a newSelectableChannelused for the socket communication.- Specified by:
newSelectableChannelin interfaceTransport- Returns:
- a new
SelectableChannelused for the socket communication, ornullif the communication does not use sockets. - Throws:
IOException- if theSelectableChannelcannot be created
-
newEndPoint
public EndPoint newEndPoint(Scheduler scheduler, ManagedSelector selector, SelectableChannel selectable, SelectionKey selectionKey) Description copied from interface:TransportFor
Transports that are based on sockets, or forTransports that are layered on top of anotherTransportthat is based on sockets, this method is invoked to create a newEndPointthat wraps theSelectableChannelcreated byTransport.newSelectableChannel().- Specified by:
newEndPointin interfaceTransport- Parameters:
scheduler- theSchedulerselector- theManagedSelectorselectable- theSelectableChannelselectionKey- theSelectionKey- Returns:
- a new
EndPoint
-
newConnection
Description copied from interface:TransportCreates a new
Connectionto be associated with the given low-levelEndPoint.For non-layered
Transports such as TCP/IP, theConnectionis typically that of the high-level protocol. For layeredTransports such as QUIC, theConnectionis typically that of the layeredTransport.- Specified by:
newConnectionin interfaceTransport- Parameters:
endPoint- theEndPointto associate theConnectiontocontext- the context information to create the connection- Returns:
- a new
Connection - Throws:
IOException- if theConnectioncannot be created
-
toString
-