This closes #2 print-data change

This commit is contained in:
Clebert Suconic 2015-05-28 11:20:37 -04:00
commit 043909bded
1 changed files with 14 additions and 1 deletions

View File

@ -319,10 +319,23 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage
public String toString() public String toString()
{ {
return "ServerMessage[messageID=" + messageID + ",durable=" + isDurable() + ",userID=" + getUserID() + ",priority=" + this.getPriority() + ", bodySize=" + this.getBodyBufferCopy().capacity() + return "ServerMessage[messageID=" + messageID + ",durable=" + isDurable() + ",userID=" + getUserID() + ",priority=" + this.getPriority() + ", bodySize=" + this.getBodyBufferCopy().capacity() +
",expiration=" + (this.getExpiration() != 0 ? new java.util.Date(this.getExpiration()) : 0) + ", timestamp=" + toDate(getTimestamp()) + ",expiration=" + toDate(getExpiration()) +
", durable=" + durable + ", address=" + getAddress() + ",properties=" + properties.toString() + "]@" + System.identityHashCode(this); ", durable=" + durable + ", address=" + getAddress() + ",properties=" + properties.toString() + "]@" + System.identityHashCode(this);
} }
private static String toDate(long timestamp)
{
if (timestamp == 0)
{
return "0";
}
else
{
return new java.util.Date(timestamp).toString();
}
}
public InputStream getBodyInputStream() public InputStream getBodyInputStream()
{ {
return null; return null;