Class AoservDaemonConnection
java.lang.Object
com.aoindustries.aoserv.daemon.client.AoservDaemonConnection
- All Implemented Interfaces:
Closeable,AutoCloseable
A connection between an AOServ Daemon Client and an AOServ Daemon.
- Author:
- AO Industries, Inc.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAoservDaemonConnection(AoservDaemonConnector connector) Creates a newAoservConnection. -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Closes this connection to the server so that a reconnect is forced in the future.Closes this connection to the server so that a reconnect is forced in the future.voidclose()Releases this connection back to the pool.Gets the protocol negotiated for this connection.getRequestOut(int taskCode) Begins a task and gets the stream to write to the server.Gets the stream to read from the server.
-
Constructor Details
-
AoservDaemonConnection
Creates a newAoservConnection.TODO: Once all daemons are running > version 1.77, can simplify this considerably
- Throws:
IOException
-
-
Method Details
-
close
Releases this connection back to the pool.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- See Also:
-
abort
Closes this connection to the server so that a reconnect is forced in the future. Adds any new throwables tot0viaThrowables.addSuppressed(java.lang.Throwable, java.lang.Throwable). -
abort
Closes this connection to the server so that a reconnect is forced in the future.- Throws:
IOException
-
getRequestOut
Begins a task and gets the stream to write to the server.- Throws:
IOException
-
getResponseIn
Gets the stream to read from the server.- Throws:
IOException
-
getProtocolVersion
Gets the protocol negotiated for this connection.
-
