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
ModifierConstructorDescriptionprotected
AoservDaemonConnection
(AoservDaemonConnector connector) Creates a newAoservConnection
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
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.void
close()
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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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 tot0
viaThrowables.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.
-