mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Add transports to DB during startup. #269
This commit is contained in:
@@ -9,10 +9,9 @@ import java.io.InputStream;
|
||||
*/
|
||||
public interface TransportConnectionReader {
|
||||
|
||||
/** Returns the maximum latency of the transport in milliseconds. */
|
||||
long getMaxLatency();
|
||||
|
||||
/** Returns an input stream for reading from the transport connection. */
|
||||
/**
|
||||
* Returns an input stream for reading from the transport connection.
|
||||
*/
|
||||
InputStream getInputStream() throws IOException;
|
||||
|
||||
/**
|
||||
@@ -20,10 +19,13 @@ public interface TransportConnectionReader {
|
||||
* simplex, the connection is closed. If the transport is duplex, the
|
||||
* connection is closed if <tt>exception</tt> is true or the other side of
|
||||
* the connection has been marked as closed.
|
||||
* @param exception true if the connection is being closed because of an
|
||||
* exception. This may affect how resources are disposed of.
|
||||
*
|
||||
* @param exception true if the connection is being closed because of an
|
||||
* exception. This may affect how resources are disposed
|
||||
* of.
|
||||
* @param recognised true if the connection is definitely a Briar transport
|
||||
* connection. This may affect how resources are disposed of.
|
||||
* connection. This may affect how resources are disposed
|
||||
* of.
|
||||
*/
|
||||
void dispose(boolean exception, boolean recognised) throws IOException;
|
||||
}
|
||||
|
||||
@@ -2,12 +2,23 @@ package org.briarproject.api.plugins.duplex;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
|
||||
/** Factory for creating a plugin for a duplex transport. */
|
||||
/**
|
||||
* Factory for creating a plugin for a duplex transport.
|
||||
*/
|
||||
public interface DuplexPluginFactory {
|
||||
|
||||
/** Returns the plugin's transport identifier. */
|
||||
/**
|
||||
* Returns the plugin's transport identifier.
|
||||
*/
|
||||
TransportId getId();
|
||||
|
||||
/** Creates and returns a plugin, or null if no plugin can be created. */
|
||||
/**
|
||||
* Returns the maximum latency of the transport in milliseconds.
|
||||
*/
|
||||
int getMaxLatency();
|
||||
|
||||
/**
|
||||
* Creates and returns a plugin, or null if no plugin can be created.
|
||||
*/
|
||||
DuplexPlugin createPlugin(DuplexPluginCallback callback);
|
||||
}
|
||||
|
||||
@@ -2,12 +2,23 @@ package org.briarproject.api.plugins.simplex;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
|
||||
/** Factory for creating a plugin for a simplex transport. */
|
||||
/**
|
||||
* Factory for creating a plugin for a simplex transport.
|
||||
*/
|
||||
public interface SimplexPluginFactory {
|
||||
|
||||
/** Returns the plugin's transport identifier. */
|
||||
/**
|
||||
* Returns the plugin's transport identifier.
|
||||
*/
|
||||
TransportId getId();
|
||||
|
||||
/** Creates and returns a plugin, or null if no plugin can be created. */
|
||||
/**
|
||||
* Returns the maximum latency of the transport in milliseconds.
|
||||
*/
|
||||
int getMaxLatency();
|
||||
|
||||
/**
|
||||
* Creates and returns a plugin, or null if no plugin can be created.
|
||||
*/
|
||||
SimplexPlugin createPlugin(SimplexPluginCallback callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user