Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

StubTask.hh

Go to the documentation of this file.
00001 /*
00002  * StubTask.hh
00003  *
00004  * Copyright (c) 2003 The University of Utah and the Flux Group.
00005  * All rights reserved.
00006  *
00007  * This file is licensed under the terms of the GNU Public License.  
00008  * See the file "license.terms" for restrictions on redistribution 
00009  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00010  */
00011 
00012 /**
00013  * @file StubTask.hh
00014  *
00015  * Header file and implementation for the StubTask class.
00016  */
00017 
00018 #ifndef _stub_task_hh
00019 #define _stub_task_hh
00020 
00021 #include "BrokerS.h"
00022 
00023 /**
00024  * A Broker::Task class that can be used for testing.
00025  */
00026 class StubTask : public POA_Broker::Task
00027 {
00028 
00029 public:
00030 
00031     /**
00032      * Construct an empty StubTask object.
00033      */
00034     StubTask()
00035     {
00036     };
00037 
00038     /**
00039      * Deconstruct a StubTask object.
00040      */
00041     virtual ~StubTask()
00042     {
00043     };
00044 
00045     /**
00046      * @return The string "<stub>".
00047      */
00048     virtual char *Name()
00049         throw (CORBA::SystemException)
00050     {
00051         return CORBA::string_dup("<stub>");
00052     };
00053 
00054     /**
00055      * Empty implementation of Broker::Task::BeginCPUScheduling.
00056      *
00057      * @param manager Unused.
00058      * @param sp Unused.
00059      */
00060     virtual void BeginCPUScheduling(Broker::Manager_ptr manager,
00061                                     const Broker::ScheduleParameters &sp)
00062         throw (CORBA::SystemException,
00063                Broker::DuplicateScheduleParameter,
00064                Broker::InvalidScheduleParameter,
00065                Broker::MissingScheduleParameter)
00066     {
00067         this->st_Manager = Broker::Manager::_duplicate(manager);
00068     };
00069 
00070     /**
00071      * Empty implementation of Broker::Task::EndCPUScheduling.
00072      */
00073     virtual void EndCPUScheduling(void)
00074         throw (CORBA::SystemException)
00075     {
00076         this->st_Manager = Broker::Manager::_nil();
00077     };
00078 
00079 protected:
00080 
00081     /**
00082      * The Broker::Manager used to handle scheduling during contention.  Only
00083      * valid between #BeginCPUScheduling and #EndCPUScheduling calls.
00084      */
00085     Broker::Manager_var st_Manager;
00086     
00087 };
00088 
00089 #endif

Generated on Mon Dec 1 16:29:07 2003 for CPU Broker by doxygen 1.3.4