diff options
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; } |