Try to reconnect on connection loss. #262

This commit is contained in:
akwizgran
2016-05-04 11:30:41 +01:00
parent 5f5ceedc29
commit dd9bc74262
7 changed files with 134 additions and 29 deletions

View File

@@ -0,0 +1,30 @@
package org.briarproject.api.event;
import org.briarproject.api.TransportId;
import org.briarproject.api.contact.ContactId;
public class ConnectionClosedEvent extends Event {
private final ContactId contactId;
private final TransportId transportId;
private final boolean incoming;
public ConnectionClosedEvent(ContactId contactId, TransportId transportId,
boolean incoming) {
this.contactId = contactId;
this.transportId = transportId;
this.incoming = incoming;
}
public ContactId getContactId() {
return contactId;
}
public TransportId getTransportId() {
return transportId;
}
public boolean isIncoming() {
return incoming;
}
}

View File

@@ -0,0 +1,30 @@
package org.briarproject.api.event;
import org.briarproject.api.TransportId;
import org.briarproject.api.contact.ContactId;
public class ConnectionOpenedEvent extends Event {
private final ContactId contactId;
private final TransportId transportId;
private final boolean incoming;
public ConnectionOpenedEvent(ContactId contactId, TransportId transportId,
boolean incoming) {
this.contactId = contactId;
this.transportId = transportId;
this.incoming = incoming;
}
public ContactId getContactId() {
return contactId;
}
public TransportId getTransportId() {
return transportId;
}
public boolean isIncoming() {
return incoming;
}
}