Brad Fitzpatrick > DJabberd > DJabberd::Component

Download:
DJabberd-0.83.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  6
Open  0
View/Report Bugs
Source   Latest Release: DJabberd-0.85

NAME ^

DJabberd::Component - Abstract class representing a component in DJabberd

SYNOPSIS ^

    package MyPackage::DJabberd::MyComponent;
    use base DJabberd::Component;
    
    sub initialize {
        my ($self, $opts) = @_;
        
        # ... perform initialization
    }
    
    sub handle_stanza {
        my ($self, $vhost, $stanza) = @_;
        
        # ... handle the given stanza
    }

This class provides a parent class for all DJabberd components. Components that inherit from this class can then be used directly by the server via the DJabberd::Plugin::Component plugin, or used directly by other classes.

See DJabberd::Component::Example for an example component implementation.

TODO: Write more docs

syntax highlighting: