Return-Path: Delivered-To: apmail-incubator-directory-cvs-archive@www.apache.org Received: (qmail 24064 invoked from network); 2 Nov 2004 19:28:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Nov 2004 19:28:30 -0000 Received: (qmail 51320 invoked by uid 500); 2 Nov 2004 19:28:30 -0000 Delivered-To: apmail-incubator-directory-cvs-archive@incubator.apache.org Received: (qmail 51272 invoked by uid 500); 2 Nov 2004 19:28:30 -0000 Mailing-List: contact directory-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: directory-dev@incubator.apache.org Delivered-To: mailing list directory-cvs@incubator.apache.org Received: (qmail 51259 invoked by uid 99); 2 Nov 2004 19:28:30 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 02 Nov 2004 11:28:29 -0800 Received: (qmail 24058 invoked by uid 65534); 2 Nov 2004 19:28:28 -0000 Date: 2 Nov 2004 19:28:28 -0000 Message-ID: <20041102192828.24052.qmail@minotaur.apache.org> From: akarasulu@apache.org To: directory-cvs@incubator.apache.org Subject: svn commit: rev 56404 - incubator/directory/seda/trunk/src/java/org/apache/seda/protocol X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Tue Nov 2 11:28:27 2004 New Revision: 56404 Added: incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractManyReplyHandler.java incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractNoReplyHandler.java incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractRequestHandler.java incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractSingleReplyHandler.java Modified: incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/ProtocolProvider.java Log: added some abstract convenience classes for request handlers Added: incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractManyReplyHandler.java ============================================================================== --- (empty file) +++ incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractManyReplyHandler.java Tue Nov 2 11:28:27 2004 @@ -0,0 +1,53 @@ +/* + * 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. + * + */ +package org.apache.seda.protocol; + + +/** + * An abstract ManyReplyHandler convenience class. + * + * @author Apache Directory Project + * @version $Rev$ + */ +public abstract class AbstractManyReplyHandler extends AbstractRequestHandler implements ManyReplyHandler +{ + /** whether or not this handler requires sequential returns of responses */ + private final boolean isSequential; + + + /** + * Creates a ManyReplyHandler. + * + * @param isSequential true if responses must be returned sequentially, + * false of the order of return is not significant. + */ + public AbstractManyReplyHandler( boolean isSequential ) + { + super( HandlerTypeEnum.MANYREPLY ); + + this.isSequential = isSequential; + } + + + /** + * @see ManyReplyHandler#isSequential() + */ + public boolean isSequential() + { + return this.isSequential; + } +} Added: incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractNoReplyHandler.java ============================================================================== --- (empty file) +++ incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractNoReplyHandler.java Tue Nov 2 11:28:27 2004 @@ -0,0 +1,35 @@ +/* + * 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. + * + */ +package org.apache.seda.protocol; + + +/** + * An abstract convenience class for a NoReplyHandler. + * + * @author Apache Directory Project + * @version $Rev$ + */ +public abstract class AbstractNoReplyHandler extends AbstractRequestHandler implements NoReplyHandler +{ + /** + * Creates a NoReplyHandler with type {@link HandlerTypeEnum#NOREPLY}. + */ + public AbstractNoReplyHandler() + { + super( HandlerTypeEnum.NOREPLY ); + } +} Added: incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractRequestHandler.java ============================================================================== --- (empty file) +++ incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractRequestHandler.java Tue Nov 2 11:28:27 2004 @@ -0,0 +1,50 @@ +/* + * 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. + * + */ +package org.apache.seda.protocol; + + +/** + * An abstract request handler convenience class. + * + * @author Apache Directory Project + * @version $Rev$ + */ +public abstract class AbstractRequestHandler implements RequestHandler +{ + /** the handler type */ + private final HandlerTypeEnum type; + + + /** + * Sets the type for this handler. + * + * @param type the handler type + */ + public AbstractRequestHandler( HandlerTypeEnum type ) + { + this.type = type; + } + + + /** + * @see RequestHandler#getHandlerType() + */ + public HandlerTypeEnum getHandlerType() + { + return this.type; + } +} Added: incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractSingleReplyHandler.java ============================================================================== --- (empty file) +++ incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/AbstractSingleReplyHandler.java Tue Nov 2 11:28:27 2004 @@ -0,0 +1,35 @@ +/* + * 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. + * + */ +package org.apache.seda.protocol; + + +/** + * An abstract convenience class for a SingleReplyHandler. + * + * @author Apache Directory Project + * @version $Rev$ + */ +public abstract class AbstractSingleReplyHandler extends AbstractRequestHandler implements SingleReplyHandler +{ + /** + * Creates a SingleReplyHandler with type {@link HandlerTypeEnum#SINGLEREPLY}. + */ + public AbstractSingleReplyHandler() + { + super( HandlerTypeEnum.SINGLEREPLY ); + } +} Modified: incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/ProtocolProvider.java ============================================================================== --- incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/ProtocolProvider.java (original) +++ incubator/directory/seda/trunk/src/java/org/apache/seda/protocol/ProtocolProvider.java Tue Nov 2 11:28:27 2004 @@ -14,7 +14,6 @@ * limitations under the License. * */ - package org.apache.seda.protocol; import org.apache.commons.codec.stateful.DecoderFactory;