directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r433695 - /directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResponseCarryingMessageException.java
Date Tue, 22 Aug 2006 17:08:42 GMT
Author: elecharny
Date: Tue Aug 22 10:08:41 2006
New Revision: 433695

URL: http://svn.apache.org/viewvc?rev=433695&view=rev
Log:
Added an exception to carry the response when we got an exception
while decoding a PDU

Added:
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResponseCarryingMessageException.java

Added: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResponseCarryingMessageException.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResponseCarryingMessageException.java?rev=433695&view=auto
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResponseCarryingMessageException.java
(added)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResponseCarryingMessageException.java
Tue Aug 22 10:08:41 2006
@@ -0,0 +1,90 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+/*
+ * $Id: MessageException.java 379008 2006-02-20 03:35:07Z akarasulu $
+ *
+ * -- (c) LDAPd Group                                                    --
+ * -- Please refer to the LICENSE.txt file in the root directory of      --
+ * -- any LDAPd project for copyright and distribution information.      --
+ *
+ */
+
+package org.apache.directory.shared.ldap.message;
+
+
+import org.apache.directory.shared.ldap.RuntimeMultiException;
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+
+
+/**
+ * This exception is thrown when a message processing error occurs.
+ * 
+ * @author Apache Software Foundation
+ */
+public class ResponseCarryingMessageException extends RuntimeMultiException
+{
+    /**
+     * Declares the Serial Version Uid.
+     * 
+     * @see <a
+     *      href="http://c2.com/cgi/wiki?AlwaysDeclareSerialVersionUid">Always
+     *      Declare Serial Version Uid</a>
+     */
+    private static final long serialVersionUID = 1L;
+
+    /** The response with the error cause */
+    private LdapMessage response;
+    
+    /**
+     * Constructs an Exception without a message.
+     */
+    public ResponseCarryingMessageException()
+    {
+        super();
+    }
+
+
+    /**
+     * Constructs an Exception with a detailed message.
+     * 
+     * @param a_message
+     *            The message associated with the exception.
+     */
+    public ResponseCarryingMessageException(String message)
+    {
+        super( message );
+    }
+    
+    /**
+     * Set a response if we get an exception while parsing the message
+     * @param response the constructed response
+     */
+    public void setResponse( LdapMessage response ) 
+    {
+        this.response = response;
+    }
+    
+    /**
+     * Get the constructed response
+     * @return The constructed response
+     */
+    public LdapMessage getResponse()
+    {
+        return response;
+    }
+}



Mime
View raw message