From 2962187b75de18432a593061e2a4091367d80ebf Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Thu, 18 Sep 2003 20:39:14 +0000 Subject: [PATCH] Added isSecureConnection method (SMACK-84) git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2089 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/SSLXMPPConnection.java | 4 ++++ source/org/jivesoftware/smack/XMPPConnection.java | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/source/org/jivesoftware/smack/SSLXMPPConnection.java b/source/org/jivesoftware/smack/SSLXMPPConnection.java index 76e540e23..33c8d883f 100644 --- a/source/org/jivesoftware/smack/SSLXMPPConnection.java +++ b/source/org/jivesoftware/smack/SSLXMPPConnection.java @@ -120,6 +120,10 @@ public class SSLXMPPConnection extends XMPPConnection { super.init(); } + public boolean isSecureConnection() { + return true; + } + /** * An SSL socket factory that will let any certifacte past, even if it's expired or * not singed by a root CA. diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index 9586056c0..f88f8eebe 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -483,6 +483,15 @@ public class XMPPConnection { return connected; } + /** + * Returns true if the connection is a secured one, such as an SSL connection. + * + * @return true if a secure connection to the server. + */ + public boolean isSecureConnection() { + return false; + } + /** * Returns true if currently authenticated by successfully calling the login method. *