Interface ClientConnection
- All Superinterfaces:
ReleasableResource
- All Known Implementing Classes:
TcpClientConnection, UnixDomainSocketClientConnection
Client connection.
This allows usage of a custom connection for testing - see
DirectClient class.-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanCheck whether this connection is allowed to send 100-Continue.default voidallowExpectContinue(boolean allowExpectContinue) Set whether this connection allows 100-Continue to be sent.Channel id, mostly used in logs.default ClientConnectionconnect()Connect this connection.AssociatedHelidonSocket.default booleanCheck whether this connection is connected.reader()Data reader providing response bytes.voidreadTimeout(Duration readTimeout) Read timeout for this connection.writer()Data writer the client request writes to.Methods inherited from interface ReleasableResource
closeResource, releaseResourceModifier and TypeMethodDescriptionvoidCloses the resource, we cannot use nameclose, as that would conflict withAutoCloseable, as we do not want to have a checked exception thrown.default voidReleases the resource, and if this resource is re-usable, enabled reuse.
-
Method Details
-
reader
DataReader reader()Data reader providing response bytes.- Returns:
- reader to read from this connection
-
writer
DataWriter writer()Data writer the client request writes to.- Returns:
- writer to write to this connection
-
channelId
-
helidonSocket
-
readTimeout
Read timeout for this connection.- Parameters:
readTimeout- connection read timeout
-
allowExpectContinue
default boolean allowExpectContinue()Check whether this connection is allowed to send 100-Continue.- Returns:
- whether 100-Continue is allowed
-
allowExpectContinue
default void allowExpectContinue(boolean allowExpectContinue) Set whether this connection allows 100-Continue to be sent.- Parameters:
allowExpectContinue- whether to allow 100-Continue
-
isConnected
default boolean isConnected()Check whether this connection is connected.- Returns:
- true if connected, false otherwise
-
connect
-