mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
ExceptionHandler interface.
This commit is contained in:
6
api/net/sf/briar/api/ExceptionHandler.java
Normal file
6
api/net/sf/briar/api/ExceptionHandler.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package net.sf.briar.api;
|
||||
|
||||
public interface ExceptionHandler<E extends Exception> {
|
||||
|
||||
void handleException(E exception);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.sf.briar.api.transport;
|
||||
|
||||
import net.sf.briar.api.ExceptionHandler;
|
||||
import net.sf.briar.api.db.DbException;
|
||||
import net.sf.briar.api.protocol.TransportId;
|
||||
|
||||
@@ -15,12 +16,10 @@ public interface ConnectionRecogniser {
|
||||
*/
|
||||
void acceptConnection(TransportId t, byte[] tag, Callback c);
|
||||
|
||||
interface Callback {
|
||||
interface Callback extends ExceptionHandler<DbException> {
|
||||
|
||||
void connectionAccepted(ConnectionContext ctx);
|
||||
|
||||
void connectionRejected();
|
||||
|
||||
void handleException(DbException e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user