service.rb

Path: lib/mues/service.rb  (CVS)
Last Update: Sat Aug 18 22:54:10 -0700 2007

This is an abstract base class for MUES services. A service is a subsystem which provides some auxilliary functionality to the hosted environments or other subsystems.

To implement a new service:

  • Encapsulate the functions you want to offer in a class that inherits from the MUES::Service class.
  • Add your class to the mues/lib/services directory, or require it explicitly from somewhere.
  • Add the events you want to use for interacting with your service either to mues/events/ServiceEvents.rb, or define them in a separate class and add the file to the list of requires to mues/Events.rb.

Synopsis

  require 'mues/mixins'
  require 'mues/service'
  require 'mues/events'
  require "somethingElse"

  module MUES
    class MyService < Service ; implements Notifiable

    def initialize
      registerHandlerForEvents( MyServiceEvent )
    end

    end # class MyService
  end # module MUES

Subversion ID

$Id: service.rb 1206 2004-05-09 21:25:11Z deveiant $

Authors

  • Michael Granger <ged@FaerieMUD.org>

Copyright

Copyright (c) 2000-2003 The FaerieMUD Consortium. All rights reserved.

This module is free software. You may use, modify, and/or redistribute this software under the terms of the Perl Artistic License. (See language.perl.com/misc/Artistic.html)

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Required files

pluginfactory   mues/object   mues/exceptions   mues/events  

[Validate]