Skip to content

Commit 5520f4f

Browse files
committed
better ui integration. Shall become an alpha in near future.
1 parent 63d1bf8 commit 5520f4f

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

libs/ASAPJava.jar

4.17 KB
Binary file not shown.

src/main/java/net/sharksystem/hub/hubside/ASAPTCPHub.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void run() {
101101
newConnection.getInputStream(), newConnection.getOutputStream(), this);
102102
} else {
103103
// another connector has connected
104-
hubConnectorSession = new SharedChannelConnectorHubSideImpl(
104+
hubConnectorSession = new SharedChannelConnectorHubSide(
105105
newConnection.getInputStream(), newConnection.getOutputStream(), this);
106106
}
107107
(new ConnectorThread(hubConnectorSession, newConnection.getInputStream())).start();

src/main/java/net/sharksystem/hub/hubside/MultipleTCPChannelsConnectorHubSideImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import java.io.OutputStream;
1414
import java.net.ServerSocket;
1515

16-
public class MultipleTCPChannelsConnectorHubSideImpl extends SharedChannelConnectorHubSideImpl
16+
public class MultipleTCPChannelsConnectorHubSideImpl extends SharedChannelConnectorHubSide
1717
implements NewConnectionCreatorListener {
1818

1919
public MultipleTCPChannelsConnectorHubSideImpl(InputStream is, OutputStream os, HubInternal hub)

src/main/java/net/sharksystem/hub/hubside/SharedChannelConnectorHubSideImpl.java renamed to src/main/java/net/sharksystem/hub/hubside/SharedChannelConnectorHubSide.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.util.List;
2020
import java.util.Set;
2121

22-
public class SharedChannelConnectorHubSideImpl extends SharedChannelConnectorImpl
22+
public class SharedChannelConnectorHubSide extends SharedChannelConnectorImpl
2323
implements ConnectorInternal, AlarmClockListener, WrappedStreamPairListener {
2424

2525
private String peerID = null; // represented and connected peer
@@ -34,7 +34,7 @@ public boolean isHubSide() {
3434
return true;
3535
}
3636

37-
public SharedChannelConnectorHubSideImpl(InputStream is, OutputStream os, HubInternal hub) throws ASAPException {
37+
public SharedChannelConnectorHubSide(InputStream is, OutputStream os, HubInternal hub) throws ASAPException {
3838
super(is, os);
3939

4040
if(hub == null) throw new ASAPHubException("hub must not be null");

src/main/java/net/sharksystem/hub/peerside/ASAPHubManager.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ public interface ASAPHubManager {
2020
void setTimeOutInMillis(int millis);
2121

2222
/**
23-
* Callee provide a list of hub descriptions. This method tries to establish a connection.
24-
* Such an attempt can fail (wrong description, hub gone, network error etc.). This method can also
25-
* stop all connector which are no longer in the list
23+
* Callee provides a list of hub descriptions. This method synchronizes existing connections with this list.
24+
* A new connection if a hub description is in the list but no connection has been established.
25+
* A connection is ended if a hub description is not in the list but a connection is established
26+
* (only if the boolean parameter is set).
27+
* Nothing happens if a connection exists and the hub is still in the list.
28+
*
29+
* Such an attempt can fail (wrong description, hub gone, network error etc.).
2630
*
2731
* @param descriptions
2832
* @param asapPeer

src/main/java/net/sharksystem/hub/peerside/ASAPHubManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,13 @@ public void run() {
274274
@Override
275275
public void notifyConnectedAndOpen() {
276276
// ignore
277+
Log.writeLog(this, this.toString(), "notifyConnectedAndOpen");
277278
}
278279

279280
@Override
280281
public void notifySynced(Connector connector, boolean changed) {
281282
Log.writeLog(this, this.toString(), "synced (changed: " + changed + ")");
282-
// Log.writeLog(this, this.toString(), ">>>>>>>>>>>>>>>>>>>TODO***TODO***TODO<<<<<<<<<<<<<<<<<<<<<");
283+
283284
if(/*changed && */ connector instanceof HubConnector) { // maybe new message in ASAP peer... connect each round
284285
HubConnector hubConnector = (HubConnector) connector;
285286
try {

0 commit comments

Comments
 (0)