toString() methods in some events
This commit is contained in:
@@ -12,4 +12,9 @@ class Event {
|
|||||||
seqNo = SEQ_NO.getAndIncrement()
|
seqNo = SEQ_NO.getAndIncrement()
|
||||||
timestamp = System.currentTimeMillis()
|
timestamp = System.currentTimeMillis()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
"seqNo $seqNo timestamp $timestamp"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class EventBus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void publishInternal(Event e) {
|
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
|
def currentHandlers
|
||||||
final def clazz = e.getClass()
|
final def clazz = e.getClass()
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
|
|||||||
@@ -11,4 +11,9 @@ class ConnectionEvent extends Event {
|
|||||||
Boolean leaf // can be null if uknown
|
Boolean leaf // can be null if uknown
|
||||||
ConnectionAttemptStatus status
|
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) {}
|
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 {
|
class HostDiscoveredEvent extends Event {
|
||||||
|
|
||||||
Destination destination
|
Destination destination
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
"HostDiscoveredEvent ${super.toString()} destination:${destination.toBase32()}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user