}
public boolean isSessionPingSupported() {
lock(Thread.currentThread());
try {
ClientServerHello csh = null;
try {
Method getVersionInfoMethod = myConnection.getClass().getMethod("getVersionInfo", new Class[0]);
if (getVersionInfoMethod != null) {
Object result = getVersionInfoMethod.invoke(myConnection, new Object[0]);
if (result instanceof ClientServerHello) {
csh = (ClientServerHello) result;
}
}
} catch (SecurityException e1) {
} catch (NoSuchMethodException e1) {
} catch (IllegalArgumentException e) {
} catch (IllegalAccessException e) {
} catch (InvocationTargetException e) {
}
String version = null;
if (csh != null && csh.getServerString() != null) {
version = new String(csh.getServerString());
} else {
return false;
}
if (version != null && version.indexOf("OpenSSH") >= 0) {
return true;