NAME

Simulation::DiscreteEvent::Server - Moose class for implementing servers

SYNOPSIS

package MyServer;
use Moose;
BEGIN {
    extends 'Simulation::DiscreteEvent::Server';
}
sub handler1 : Event(start) {
    # handle start event here
}
sub handler2 : Event(stop) {
    # handle stop event here
}
no Moose;
__PACKAGE__->meta->make_immutable;

DESCRIPTION

This is a base class for implementing servers for Simulation::DiscreteEvent models.

METHODS

$self->name([$name])

Allows you to get/set the name of the server

$self->handle($event, @args)

Invokes handler for $event and passes @args as arguments.

AUTHOR

Pavel Shaydo, <zwon at cpan.org>

SUPPORT

Please see documentation for Simulation::DiscreteEvent

LICENSE AND COPYRIGHT

Copyright 2010 Pavel Shaydo.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.