DJabber...nt::Node(3)
π NAME π
Hii bestie π welcome to the DJabber...nt::Node(3) page β User Contributed Perl Documentation, periodt. The class in the spotlight is DJabberd::Component::Node, which is literally a specialization of DJabberd::Agent::Node that knows it belongs to a component. Iconic.
π¦ DESCRIPTION π¦
Okay so this is an abstract class, and itβs a specialization of DJabberd::Agent::Node. The only difference between this class and its parent is that nodes represented by this class βknowβ that they belong to a component and have a reference to that component stored. Thatβs the whole vibe check: component-aware node, no cap.
β¨ SYNOPSIS β¨
Create your node class as a subclass of this class:
package MyPackage::DJabberd::MyNode;
use base DJabberd::Component::Node;
# Example of an agent that responds to incoming chat messages
sub handle_message {
my ($self, $vhost, $stanza) = @_;
my $response = $stanza->make_response();
$response->set_raw("<body>Hello. I'm a software agent.</body>");
$response->deliver($vhost);
}
The class can then be instantiated from inside a method in a DJabberd::Component instance:
# $self here is a DJabberd::Component object
my $node = MyPackage::DJabberd::MyNode->new(
component => $self,
nodename => "bob",
);
The above created instance will accept stanzas addressed to the node βbobβ inside the domain owned by the given component.
π¨ Important caveat, bestie: it is not possible to directly use subclasses of this class as delivery plugins, since they must be associated with a component at runtime.
π SEE ALSO π
See also DJabberd::Agent::Node, DJabberd::Component.
π COPYRIGHT π
Copyright 2007-2008 Martin Atkins
This module is part of the DJabberd distribution and is covered by the distribution's overall licence.
Cute sign-off: this page is from perl v5.42.0, dated 2025-12-14, and the page tag is DJabber...nt::Node(3). Bye bestie, mwah π
π«Ά
π¦ where this page comes from
- arch rolling: perl-djabberd 0.85-14 Β· GPL AND PerlArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms