mirror of https://github.com/zlatinb/muwire
toString() methods in some events
parent
351edcb20e
commit
3b616b8947
|
@ -12,4 +12,9 @@ class Event {
|
|||
seqNo = SEQ_NO.getAndIncrement()
|
||||
timestamp = System.currentTimeMillis()
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
"seqNo $seqNo timestamp $timestamp"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class EventBus {
|
|||
}
|
||||
|
||||
private void publishInternal(Event e) {
|
||||
log.fine "publishing event of type ${e.getClass().getSimpleName()} seqNo ${e.seqNo} timestamp ${e.timestamp}"
|
||||
log.fine "publishing event $e"
|
||||
def currentHandlers
|
||||
final def clazz = e.getClass()
|
||||
synchronized(this) {
|
||||
|
|
|
@ -10,5 +10,10 @@ class ConnectionEvent extends Event {
|
|||
boolean incoming
|
||||
Boolean leaf // can be null if uknown
|
||||
ConnectionAttemptStatus status
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
"ConnectionEvent ${super.toString()} endpoint: $endpoint incoming: $incoming leaf : $leaf status : $status"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,4 +32,9 @@ class Endpoint implements Closeable {
|
|||
try {outputStream.close()} catch (Exception ignore) {}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
"destination: ${destination.toBase32()}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,4 +7,9 @@ import net.i2p.data.Destination
|
|||
class HostDiscoveredEvent extends Event {
|
||||
|
||||
Destination destination
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
"HostDiscoveredEvent ${super.toString()} destination:${destination.toBase32()}"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue