servlib/bundling/BundleDaemon.h
changeset 5 1849bf57d910
parent 0 2b3e5ec03512
child 6 d1f220643814
equal deleted inserted replaced
4:c02ca5a6ab82 5:1849bf57d910
   167     
   167     
   168     /**
   168     /**
   169      * Accessor for the custody bundles list.
   169      * Accessor for the custody bundles list.
   170      */
   170      */
   171     BundleList* custody_bundles() { return custody_bundles_; }
   171     BundleList* custody_bundles() { return custody_bundles_; }
   172     
   172    
       
   173     /**
       
   174      * Accessor for the BPQ bundles list.
       
   175      */
       
   176     BundleList* bpq_bundles() { return bpq_bundles_; }
       
   177  
   173     /**
   178     /**
   174      * Format the given StringBuffer with current routing info.
   179      * Format the given StringBuffer with current routing info.
   175      */
   180      */
   176     void get_routing_state(oasys::StringBuffer* buf);
   181     void get_routing_state(oasys::StringBuffer* buf);
   177 
   182 
   278     /**
   283     /**
   279      * This is used for delivering bundle to app by Late Binding
   284      * This is used for delivering bundle to app by Late Binding
   280      */
   285      */
   281     void check_and_deliver_to_registrations(Bundle* bundle, const EndpointID&);
   286     void check_and_deliver_to_registrations(Bundle* bundle, const EndpointID&);
   282 
   287 
       
   288     void print_cache();
   283 protected:
   289 protected:
   284     friend class BundleActions;
   290     friend class BundleActions;
   285 
   291 
   286     /**
   292     /**
   287      * Initialize and load in the registrations.
   293      * Initialize and load in the registrations.
   401      * signal to the current custodian.
   407      * signal to the current custodian.
   402      */
   408      */
   403     void release_custody(Bundle* bundle);
   409     void release_custody(Bundle* bundle);
   404 
   410 
   405     /**
   411     /**
       
   412      * Add BPQ bundle to the on-path cache
       
   413      */
       
   414     bool accept_bpq_response(Bundle* bundle);
       
   415 
       
   416     /**
       
   417      * todo
       
   418      */
       
   419     bool answer_bpq_query(Bundle* bundle);
       
   420 
       
   421     /**
   406      * Add the bundle to the pending list and (optionally) the
   422      * Add the bundle to the pending list and (optionally) the
   407      * persistent store, and set up the expiration timer for it.
   423      * persistent store, and set up the expiration timer for it.
   408      *
   424      *
   409      * @return true if the bundle is legal to be delivered and/or
   425      * @return true if the bundle is legal to be delivered and/or
   410      * forwarded, false if it's already expired
   426      * forwarded, false if it's already expired
   439      * the source id, timestamp, and fragmentation offset/length
   455      * the source id, timestamp, and fragmentation offset/length
   440      * fields.
   456      * fields.
   441      */
   457      */
   442     Bundle* find_duplicate(Bundle* bundle);
   458     Bundle* find_duplicate(Bundle* bundle);
   443 
   459 
       
   460 
       
   461     /**
       
   462      * Check the bundle source and if it contains a QUERY_EXTENSION_BLOCK
       
   463      * if if does ...
       
   464      */
       
   465     void handle_bpq_block(Bundle* b, BundleReceivedEvent* event);
       
   466 
       
   467 
   444     /**
   468     /**
   445      * Deliver the bundle to the given registration
   469      * Deliver the bundle to the given registration
   446      */
   470      */
   447     void deliver_to_registration(Bundle* bundle, Registration* registration);
   471     void deliver_to_registration(Bundle* bundle, Registration* registration);
   448     
   472     
   482     /// The list of all bundles that are still being processed
   506     /// The list of all bundles that are still being processed
   483     BundleList* pending_bundles_;
   507     BundleList* pending_bundles_;
   484 
   508 
   485     /// The list of all bundles that we have custody of
   509     /// The list of all bundles that we have custody of
   486     BundleList* custody_bundles_;
   510     BundleList* custody_bundles_;
   487     
   511    
       
   512     /// The list of all bundles with the response QUERY_EXTENSION
       
   513     BundleList* bpq_bundles_;
       
   514  
   488     /// The event queue
   515     /// The event queue
   489     oasys::MsgQueue<BundleEvent*>* eventq_;
   516     oasys::MsgQueue<BundleEvent*>* eventq_;
   490 
   517 
   491     /// The default endpoint id for reaching this daemon, used for
   518     /// The default endpoint id for reaching this daemon, used for
   492     /// bundle status reports, routing, etc.
   519     /// bundle status reports, routing, etc.