reSIProcate/repro  9694
QValueTargetHandler.hxx
Go to the documentation of this file.
00001 #ifndef Q_VALUE_TARGET_HANDLER_HXX
00002 #define Q_VALUE_TARGET_HANDLER_HXX 1
00003 
00004 #include "repro/Processor.hxx"
00005 #include "repro/ResponseContext.hxx"
00006 #include "repro/ProxyConfig.hxx"
00007 
00008 #include "rutil/Data.hxx"
00009 #include <vector>
00010 
00011 namespace repro
00012 {
00013 
00014 class RequestContext;
00015 
00016 class QValueTargetHandler : public Processor
00017 {
00018    public:
00019 
00020       typedef enum
00021       {
00022          FULL_SEQUENTIAL,
00023          EQUAL_Q_PARALLEL,
00024          FULL_PARALLEL
00025       } ForkBehavior;
00026 
00027       QValueTargetHandler(ProxyConfig& config);
00028       virtual ~QValueTargetHandler();
00029       
00030       virtual processor_action_t process(RequestContext &);
00031 
00032       void fillNextTargetGroup(std::vector<resip::Data>& fillHere,
00033                               const std::list<resip::Data>& queue,
00034                               const ResponseContext& rsp) const;
00035                            
00036       virtual bool isMyType( Target* target) const;
00037       
00038       virtual void removeTerminated(std::list<resip::Data>& queue,
00039                                     const ResponseContext& rsp) const;
00040    
00041    protected:
00042       ForkBehavior mForkBehavior;
00043       bool mCancelBetweenForkGroups;
00044       bool mWaitForTerminate;
00045       int mDelayBetweenForkGroups;
00046       int mCancellationDelay;
00047 };
00048 
00049 }
00050 
00051 #endif
00052 
00053 /* ====================================================================
00054  * The Vovida Software License, Version 1.0 
00055  * 
00056  * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
00057  * 
00058  * Redistribution and use in source and binary forms, with or without
00059  * modification, are permitted provided that the following conditions
00060  * are met:
00061  * 
00062  * 1. Redistributions of source code must retain the above copyright
00063  *    notice, this list of conditions and the following disclaimer.
00064  * 
00065  * 2. Redistributions in binary form must reproduce the above copyright
00066  *    notice, this list of conditions and the following disclaimer in
00067  *    the documentation and/or other materials provided with the
00068  *    distribution.
00069  * 
00070  * 3. The names "VOCAL", "Vovida Open Communication Application Library",
00071  *    and "Vovida Open Communication Application Library (VOCAL)" must
00072  *    not be used to endorse or promote products derived from this
00073  *    software without prior written permission. For written
00074  *    permission, please contact vocal@vovida.org.
00075  *
00076  * 4. Products derived from this software may not be called "VOCAL", nor
00077  *    may "VOCAL" appear in their name, without prior written
00078  *    permission of Vovida Networks, Inc.
00079  * 
00080  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
00081  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00082  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
00083  * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
00084  * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
00085  * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
00086  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00087  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00088  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00089  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00090  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00091  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00092  * DAMAGE.
00093  * 
00094  * ====================================================================
00095  */