mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Plugins may dispose of resources differently depending on whether a
connection was recognised.
This commit is contained in:
@@ -12,8 +12,10 @@ public interface BatchTransportReader {
|
||||
InputStream getInputStream();
|
||||
|
||||
/**
|
||||
* Closes the reader and disposes of any associated state. The argument
|
||||
* should be false if an exception was thrown while using the reader.
|
||||
* Closes the reader and disposes of any associated resources. The first
|
||||
* argument indicates whether the reader is being closed because of an
|
||||
* exception and the second argument indicates whether the connection was
|
||||
* recognised, which may affect how resources are disposed of.
|
||||
*/
|
||||
void dispose(boolean success);
|
||||
void dispose(boolean exception, boolean recognised);
|
||||
}
|
||||
|
||||
@@ -15,8 +15,9 @@ public interface BatchTransportWriter {
|
||||
OutputStream getOutputStream();
|
||||
|
||||
/**
|
||||
* Closes the writer and disposes of any associated state. The argument
|
||||
* should be false if an exception was thrown while using the writer.
|
||||
* Closes the writer and disposes of any associated resources. The
|
||||
* argument indicates whether the writer is being closed because of an
|
||||
* exception, which may affect how resources are disposed of.
|
||||
*/
|
||||
void dispose(boolean success);
|
||||
void dispose(boolean exception);
|
||||
}
|
||||
|
||||
@@ -18,8 +18,10 @@ public interface StreamTransportConnection {
|
||||
OutputStream getOutputStream() throws IOException;
|
||||
|
||||
/**
|
||||
* Closes the connection and disposes of any associated state. The argument
|
||||
* should be false if an exception was thrown while using the connection.
|
||||
* Closes the connection and disposes of any associated resources. The
|
||||
* first argument indicates whether the connection is being closed because
|
||||
* of an exception and the second argument indicates whether the connection
|
||||
* was recognised, which may affect how resources are disposed of.
|
||||
*/
|
||||
void dispose(boolean success);
|
||||
void dispose(boolean exception, boolean recognised);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user