01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package javax.naming.ldap;
19:
20: import java.util.Hashtable;
21:
22: import javax.naming.Context;
23: import javax.naming.NamingException;
24: import javax.naming.ReferralException;
25:
26: /**
27: * <code>LdapReferralException</code> is an abstract exception which extends
28: * <code>ReferralException</code> to handle LDAPv3 request controls.
29: */
30: public abstract class LdapReferralException extends ReferralException {
31:
32: /*
33: * This constant is used during deserialization to check the version which
34: * created the serialized object.
35: */
36: static final long serialVersionUID = -1668992791764950804L;
37:
38: /**
39: * Default constructor.
40: */
41: protected LdapReferralException() {
42: super ();
43: }
44:
45: /**
46: * Constructs an LdapReferralException instance using the supplied text of
47: * the message
48: *
49: * @param s
50: * the supplied text of the message, which may be null
51: */
52: protected LdapReferralException(String s) {
53: super (s);
54: }
55:
56: /**
57: * Gets referral context without environment properties.
58: *
59: * @return referral context
60: * @throws NamingException
61: * If cannot get referral context correctly.
62: */
63: @Override
64: public abstract Context getReferralContext() throws NamingException;
65:
66: /**
67: * Gets referral context with environment properties.
68: *
69: * @param h
70: * environment properties
71: * @return referral context
72: * @throws NamingException
73: * If cannot get referral context correctly.
74: */
75: @Override
76: public abstract Context getReferralContext(Hashtable<?, ?> h)
77: throws NamingException;
78:
79: /**
80: * Gets referral context with environment properties and an array of LDAPv3
81: * controls.
82: *
83: * @param h
84: * environment properties
85: * @param cs
86: * array of LDAPv3 controls
87: * @return referral context
88: * @throws NamingException
89: * If cannot get referral context correctly.
90: */
91: public abstract Context getReferralContext(Hashtable<?, ?> h,
92: Control[] cs) throws NamingException;
93:
94: }
|