Add transports to DB during startup. #269

This commit is contained in:
akwizgran
2016-03-28 13:47:23 +01:00
parent 0417639410
commit 9714713d73
40 changed files with 276 additions and 402 deletions

View File

@@ -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;
}

View File

@@ -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);
}

View File

@@ -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);
}