Commit 712252d0 authored by javed (Novell)'s avatar javed (Novell)

Implemented GetProperty function LDAPConnection object.

parent ed6a6137
/* **************************************************************************
* $Novell: /ldap/src/jldap/com/novell/ldap/client/Connection.java,v 1.30 2001/01/03 17:13:31 vtag Exp $
* $Novell: /ldap/src/jldap/com/novell/ldap/client/Connection.java,v 1.31 2001/01/04 20:14:48 vtag Exp $
*
* Copyright (C) 1999, 2000 Novell, Inc. All Rights Reserved.
*
......@@ -86,6 +86,15 @@ public final class Connection implements Runnable
private static Object nameLock = new Object(); // protect connNum
private static int connNum = 0;
private String name;
// These attributes can be retreived using the getProperty
// method in LDAPConnection. Future releases might require
// these to be local variables that can be modified using
// the setProperty method.
public static Float sdk = new Float(1.0);
public static Float protocol = new Float(3.0);
public static String security = "simple";
/**
* Create a new Connection object
*
......
/* **************************************************************************
* $Novell: /ldap/src/jldap/com/novell/ldap/LDAPConnection.java,v 1.67 2001/01/03 18:46:20 vtag Exp $
* $Novell: /ldap/src/jldap/com/novell/ldap/LDAPConnection.java,v 1.68 2001/01/04 20:12:36 vtag Exp $
*
* Copyright (C) 1999, 2000 Novell, Inc. All Rights Reserved.
*
......@@ -122,6 +122,34 @@ public class LDAPConnection implements Cloneable
*/
public static final int DEFAULT_SSL_PORT = 636;
/**
* A string that can be passed in to the getProperty method.
*
* <p>You can use this string to request the version of the SDK</p>.
*/
public static final String LDAP_PROPERTY_SDK = "version.sdk";
/**
* A string that can be passed in to the getProperty method.
*
* <p>You can use this string to request the version of the
* LDAP protocol</p>.
*/
public static final String LDAP_PROPERTY_PROTOCOL = "version.protocol";
/**
* A string that can be passed in to the getProperty method.
*
* <p>You can use this string to request the type of security
* being used</p>.
*/
public static final String LDAP_PROPERTY_SECURITY = "version.security";
/*
* Constructors
*/
......@@ -438,7 +466,14 @@ public class LDAPConnection implements Cloneable
public Object getProperty(String name)
throws LDAPException
{
throw new RuntimeException("Method LDAPConnection.getProperty not implemented");
if (name.equals(LDAP_PROPERTY_SDK))
return conn.sdk;
else if (name.equals(LDAP_PROPERTY_PROTOCOL))
return conn.protocol;
else if (name.equals(LDAP_PROPERTY_SECURITY))
return conn.security;
else
throw new RuntimeException("Property not available.");
}
/**
......
/* **************************************************************************
* $Novell: /ldap/src/jldap/com/novell/ldap/client/Connection.java,v 1.30 2001/01/03 17:13:31 vtag Exp $
* $Novell: /ldap/src/jldap/com/novell/ldap/client/Connection.java,v 1.31 2001/01/04 20:14:48 vtag Exp $
*
* Copyright (C) 1999, 2000 Novell, Inc. All Rights Reserved.
*
......@@ -86,6 +86,15 @@ public final class Connection implements Runnable
private static Object nameLock = new Object(); // protect connNum
private static int connNum = 0;
private String name;
// These attributes can be retreived using the getProperty
// method in LDAPConnection. Future releases might require
// these to be local variables that can be modified using
// the setProperty method.
public static Float sdk = new Float(1.0);
public static Float protocol = new Float(3.0);
public static String security = "simple";
/**
* Create a new Connection object
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment