diff options
author | Nick Hudson <nick.hudson@isode.com> | 2012-01-18 16:41:34 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-01-19 10:58:02 (GMT) |
commit | 252dbf0022164c429e5efa32b26a6018802cea84 (patch) | |
tree | dfbb82fe1d6d31149467fdded9ff473299fbc981 /src/com/isode/stroke/session/SessionStream.java | |
parent | 6665e38f97f95dd6e0fc574dc65a1be37b2b101f (diff) | |
download | stroke-252dbf0022164c429e5efa32b26a6018802cea84.zip stroke-252dbf0022164c429e5efa32b26a6018802cea84.tar.bz2 |
Some more "toString()" to help with development/debugging
Also fixed up some incorrect Remko copyrights
Diffstat (limited to 'src/com/isode/stroke/session/SessionStream.java')
-rw-r--r-- | src/com/isode/stroke/session/SessionStream.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/com/isode/stroke/session/SessionStream.java b/src/com/isode/stroke/session/SessionStream.java index 879ee7d..ee17a09 100644 --- a/src/com/isode/stroke/session/SessionStream.java +++ b/src/com/isode/stroke/session/SessionStream.java @@ -1,10 +1,9 @@ /* * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * All rights reserved. */ /* - * Copyright (c) 2010-2011, Isode Limited, London, England. + * Copyright (c) 2010-2012, Isode Limited, London, England. * All rights reserved. */ package com.isode.stroke.session; @@ -29,13 +28,13 @@ public abstract class SessionStream { InvalidTLSCertificateError, ConnectionReadError, ConnectionWriteError - }; + } public Error(Type type) { this.type = type; } public final Type type; - }; + } public abstract void close(); @@ -84,5 +83,16 @@ public abstract class SessionStream { protected PKCS12Certificate getTLSCertificate() { return certificate; } + + @Override + public String toString() { + String className = this.getClass().getSimpleName(); + + // Include actual type based on class name of the object + return className + + "; supportsTLSEncryption:" + supportsTLSEncryption() + + "; " + (hasTLSCertificate() ? "has" : "no") + + " certificate"; + } private PKCS12Certificate certificate; } |