1 /******************************************************************************
3 * Copyright (c) 2003 Novell Inc. www.novell.com
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the Software), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 *******************************************************************************/
24 // Novell.Directory.Ldap.InterThreadException.cs
27 // Sunil Kumar (Sunilk@novell.com)
29 // (C) 2003 Novell, Inc (http://www.novell.com)
34 namespace Novell.Directory.Ldap
38 public class InterThreadException:LdapException
40 /// <summary> Returns the message ID of this message request.
43 /// <returns> the message ID. Returns -1 if no message
44 /// is associated with this exception.
46 virtual internal int MessageID
56 return request.MessageID;
60 /// <summary> Returns the message type expected as a reply to
61 /// the message associated with this message's request type.
64 /// <returns> the message type of the expected reply. Returns -1
65 /// if no reply expected.
67 virtual internal int ReplyType
77 int reqType = request.MessageType;
78 int responseType = - 1;
82 case LdapMessage.BIND_REQUEST:
83 responseType = LdapMessage.BIND_RESPONSE;
86 case LdapMessage.UNBIND_REQUEST:
90 case LdapMessage.SEARCH_REQUEST:
91 responseType = LdapMessage.SEARCH_RESULT;
94 case LdapMessage.MODIFY_REQUEST:
95 responseType = LdapMessage.MODIFY_RESPONSE;
98 case LdapMessage.ADD_REQUEST:
99 responseType = LdapMessage.ADD_RESPONSE;
102 case LdapMessage.DEL_REQUEST:
103 responseType = LdapMessage.DEL_RESPONSE;
106 case LdapMessage.MODIFY_RDN_REQUEST:
107 responseType = LdapMessage.MODIFY_RDN_RESPONSE;
110 case LdapMessage.COMPARE_REQUEST:
111 responseType = LdapMessage.COMPARE_RESPONSE;
114 case LdapMessage.ABANDON_REQUEST:
118 case LdapMessage.EXTENDED_REQUEST:
119 responseType = LdapMessage.EXTENDED_RESPONSE;
127 private Message request;
129 /// <summary> Constructs a InterThreadException with its associated message.
132 /// <param name="message"> The text providign additional error information.
135 /// <param name="resultCode"> The error result code.
138 /// <param name="request"> The Message class associated with this exception.
141 internal InterThreadException(System.String message, System.Object[] arguments, int resultCode, System.Exception rootException, Message request):base(message, arguments, resultCode, (System.String) null, rootException)
143 this.request = request;