Interface HttpConnection
- All Known Implementing Classes:
SocketHttpConnection, SocketHttpSecureConnection
public interface HttpConnection
Http connection. Created by
HttpConnectionProvider.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes connection.Returns connection input stream.Returns connection output stream.voidinit()Initializes http connection after socket is created.voidsetTimeout(int milliseconds) Sets the timeout for connections, in milliseconds.
-
Method Details
-
init
Initializes http connection after socket is created. Applies configurations, likesetTimeout(int).- Throws:
IOException
-
getOutputStream
Returns connection output stream.- Throws:
IOException
-
getInputStream
Returns connection input stream.- Throws:
IOException
-
close
void close()Closes connection. Ignores all exceptions. -
setTimeout
void setTimeout(int milliseconds) Sets the timeout for connections, in milliseconds. With this option set to a non-zero timeout, connection will block for only this amount of time. If the timeout expires, an Exception is raised. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout.
-