my $fid = $job->{fetcher}; my $fdata = $heap->{FETCHERS}->{$fid}; delete $fdata->{jobs}->{$job->{id}}; delete $fdata->{dispatched}->{$job->{id}}; $heap->{FETCHER_STATUS}[$fid]--;

NAME

Xango::Broker::Base - Base Class for Xango Broker

SYNOPSIS

package MyBroker;
use strict;
use base qw(Xango::Broker::Base);

DESCRIPTION

Xango::Broker::Base implements the common broker methods.

You should be using Xango::Broker::Pull or Xango::Broker::Push in your applications. See respective documentations.

OBJECT METHODS

new

Create a new Xango::Broker::Base object. Arguments passed to it are stored via initialize()

attr(key => $value)

General purpose getter/stter for attributes.

dns_comp_class()

The class name for DNS resolver component.

dns_comp_alias()

The alias for DNS resolver component.

STATES

States are all called either by yield() or post(). The arguments described below are to be used in that context, i.e. yield('state', $arg1, $arg2...)

create_dns_cache

Creates and sets the DNS cache. You probably don't need to worry about this.

create_http_request

Creates a new HTTP::Request object to be fetched.

dispatch_http_fetch($job)

Start an HTTP fetch for $job. $job must have a HTTP fetcher associated to it.

dispatch_to_lighest_load($job)

Choose the HTTP fetcher session with the least load, and call dispath_http_fetch after associating it to a job

install_sighandlers

Installs the global signal handlers.

spawn_dns_comp

Spawns the component to resolve DNS lookups.

spawn_http_comp($howmany)

handle_dns_response

handle_http_response

finalize_job

SEE ALSO

Xango::Broker::Pull Xango::Broker::Push

AUTHOR

Copyright (c) 2005 Daisuke Maki <dmaki@cpan.org>. All rights reserved. Development funded by Brazil, Ltd. <http://b.razil.jp>