Thread::Apartment::MuxServer

SUMMARY: CONSTR | METHOD | DETAIL: CONSTR | METHOD

## Class Thread::Apartment::MuxServer

Inherits from:
  Thread::Apartment::Server

Abstract base class for Multiplexing server objects. Extends Thread::Apartment::Server to provide a multiplexing server which explicitly polls its TQD for incoming method calls (i.e., inverts the control scheme of T::A::Server). (Useful for object which implement their own control loop, e.g., Perl/Tk).

Uses T::A::Server's constructor.

T::A::run calls the object's run() method, which is responsible for testing the TQD at regular intervals

Licensed under the Academic Free License version 2.1, as specified in the License.txt file included in this software package, or at OpenSource.org.

Author:
  D. Arnold
Version:
  0.50
Since:
  2005-12-01

Unless otherwise noted, `$self` is the object instance variable.

Method Summary
`handle_method_requests()` Polls the TQD and handles any received method/closure requests
`run()` Thread governor for MuxServer subclasses

Method Details

### handle_method_requests

    handle_method_requests()

  Polls the TQD and handles any received method/closure requests. Mimics the behavior of Thread::Apartment's internal thread governor.

  Returns:
    1

### run

    run()

  Thread governor for MuxServer subclasses. Pure virtual function to be implemented by concrete MuxServer classes. Interleaves method request handling with its own class-specific control loop.

  Returns when either the class has determined it is completed, or when a STOP command is received.

  Returns:
    1 if the object is voluntarily vacating the thread; undef if the thread has been STOP'ed.

Generated by psichedoc on Mon Mar 27 08:51:36 2006