001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 *
019 */
020
021 package org.apache.directory.shared.dsmlv2.reponse;
022
023
024 import org.apache.directory.shared.dsmlv2.LdapMessageDecorator;
025 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
026 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
027 import org.apache.directory.shared.ldap.codec.LdapResultCodec;
028
029
030 /**
031 * Decorator abstract class for LdapResponse
032 *
033 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
034 * @version $Rev$, $Date$
035 */
036 public abstract class LdapResponseDecorator extends LdapMessageDecorator
037 {
038 /**
039 * Creates a new instance of LdapResponseDecorator.
040 *
041 * @param ldapMessage
042 * the message to decorate
043 */
044 public LdapResponseDecorator( LdapMessageCodec ldapMessage )
045 {
046 super( ldapMessage );
047 }
048
049
050 /* (non-Javadoc)
051 * @see org.apache.directory.shared.ldap.codec.LdapResponse#getLdapResponseLength()
052 */
053 public int getLdapResponseLength()
054 {
055 return ( ( LdapResponseCodec ) instance ).getLdapResponseLength();
056 }
057
058
059 /* (non-Javadoc)
060 * @see org.apache.directory.shared.ldap.codec.LdapResponse#getLdapResult()
061 */
062 public LdapResultCodec getLdapResult()
063 {
064 return ( ( LdapResponseCodec ) instance ).getLdapResult();
065 }
066
067
068 /* (non-Javadoc)
069 * @see org.apache.directory.shared.ldap.codec.LdapResponse#setLdapResult(org.apache.directory.shared.ldap.codec.LdapResult)
070 */
071 public void setLdapResult( LdapResultCodec ldapResult )
072 {
073 ( ( LdapResponseCodec ) instance ).setLdapResult( ldapResult );
074 }
075 }