Remove unused ConnectionListener.onError(...) method

This commit is contained in:
Alva Swanson 2023-02-12 19:43:37 +01:00
parent b4822761a8
commit d411ae1252
No known key found for this signature in database
GPG key ID: 004760E77F753090
15 changed files with 0 additions and 70 deletions

View file

@ -143,10 +143,6 @@ public class P2PNetworkSetup {
closeConnectionReason, connection);
}
}
@Override
public void onError(Throwable throwable) {
}
});
final BooleanProperty p2pNetworkInitialized = new SimpleBooleanProperty();

View file

@ -127,10 +127,6 @@ public class AppSetupWithP2P extends AppSetup {
closeConnectionReason, connection);
}
}
@Override
public void onError(Throwable throwable) {
}
});
final BooleanProperty p2pNetworkInitialized = new SimpleBooleanProperty();

View file

@ -176,10 +176,6 @@ public class AccountingLiteNodeNetworkService implements MessageListener, Connec
}
}
@Override
public void onError(Throwable throwable) {
}
///////////////////////////////////////////////////////////////////////////////////////////
// PeerManager.Listener implementation

View file

@ -189,10 +189,6 @@ public class LiteNodeNetworkService implements MessageListener, ConnectionListen
}
}
@Override
public void onError(Throwable throwable) {
}
///////////////////////////////////////////////////////////////////////////////////////////
// PeerManager.Listener implementation

View file

@ -115,8 +115,4 @@ public class GetInventoryRequester implements MessageListener, ConnectionListene
}
});
}
@Override
public void onError(Throwable throwable) {
}
}

View file

@ -534,10 +534,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
@Override
public void onConnection(Connection connection) {
}
@Override
public void onError(Throwable throwable) {
}
};
}

View file

@ -269,10 +269,6 @@ class BsqSwapTakeOfferViewModel extends BsqSwapOfferViewModel<BsqSwapTakeOfferDa
@Override
public void onConnection(Connection connection) {
}
@Override
public void onError(Throwable throwable) {
}
};
}

View file

@ -364,10 +364,6 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
UserThread.runAfter(() -> numConnectedPeers.set(networkNode.getAllConnections().size()), 3);
}
@Override
public void onError(Throwable throwable) {
}
///////////////////////////////////////////////////////////////////////////////////////////
// MessageListener implementation

View file

@ -21,7 +21,4 @@ public interface ConnectionListener {
void onConnection(Connection connection);
void onDisconnect(CloseConnectionReason closeConnectionReason, Connection connection);
//TODO is never called, can be removed
void onError(Throwable throwable);
}

View file

@ -198,14 +198,6 @@ public abstract class NetworkNode implements MessageListener {
printOutBoundConnections();
connectionListeners.forEach(e -> e.onDisconnect(closeConnectionReason, connection));
}
@Override
public void onError(Throwable throwable) {
if (!shutDownInProgress) {
log.error("new OutboundConnection.ConnectionListener.onError " + throwable.getMessage());
}
connectionListeners.forEach(e -> e.onError(throwable));
}
};
outboundConnection = new OutboundConnection(socket,
NetworkNode.this,
@ -486,12 +478,6 @@ public abstract class NetworkNode implements MessageListener {
printInboundConnections();
connectionListeners.stream().forEach(e -> e.onDisconnect(closeConnectionReason, connection));
}
@Override
public void onError(Throwable throwable) {
log.error("server.ConnectionListener.onError " + throwable.getMessage());
connectionListeners.stream().forEach(e -> e.onError(throwable));
}
};
server = new Server(serverSocket,
NetworkNode.this,

View file

@ -261,10 +261,6 @@ public final class PeerManager implements ConnectionListener, PersistedDataHost
maybeRemoveBannedPeer(closeConnectionReason, connection);
}
@Override
public void onError(Throwable throwable) {
}
///////////////////////////////////////////////////////////////////////////////////////////
// Connection

View file

@ -238,10 +238,6 @@ public class RequestDataManager implements MessageListener, ConnectionListener,
}
}
@Override
public void onError(Throwable throwable) {
}
///////////////////////////////////////////////////////////////////////////////////////////
// PeerManager.Listener implementation

View file

@ -139,10 +139,6 @@ public class KeepAliveManager implements MessageListener, ConnectionListener, Pe
closeHandler(connection);
}
@Override
public void onError(Throwable throwable) {
}
///////////////////////////////////////////////////////////////////////////////////////////
// PeerManager.Listener implementation

View file

@ -152,10 +152,6 @@ public class PeerExchangeManager implements MessageListener, ConnectionListener,
}
}
@Override
public void onError(Throwable throwable) {
}
///////////////////////////////////////////////////////////////////////////////////////////
// PeerManager.Listener implementation

View file

@ -727,11 +727,6 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers
});
}
@Override
public void onError(Throwable throwable) {
}
///////////////////////////////////////////////////////////////////////////////////////////
// Client API