| 1 | package Elive::Entity::ServerDetails; | ||
| 2 | 21 | ▶ | use warnings; use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 21 | ▶ | use Mouse; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 21 | extends 'Elive::DAO::Singleton','Elive::Entity'; | |
| 7 | |||
| 8 | 21 | ▶ | use Scalar::Util; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | Elive::Entity::ServerDetails - Server Details entity class | ||
| 13 | |||
| 14 | =head1 DESCRIPTION | ||
| 15 | |||
| 16 | Gets details on available Elluminate I<Live!> session servers | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | 21 | __PACKAGE__->entity_name('ServerDetails'); | |
| 21 | |||
| 22 | 21 | has 'serverDetailsId' => (is => 'rw', isa => 'Str', required => 1); | |
| 23 | 21 | __PACKAGE__->primary_key('serverDetailsId'); | |
| 24 | |||
| 25 | 21 | has 'address' => (is => 'rw', isa => 'Str'); | |
| 26 | 21 | has 'alive' => (is => 'rw', isa => 'Bool'); | |
| 27 | 21 | has 'codebase' => (is => 'rw', isa => 'Str'); | |
| 28 | 21 | has 'elsRecordingsFolder' => (is => 'rw', isa => 'Str'); | |
| 29 | 21 | has 'elmRecordingsFolder' => (is => 'rw', isa => 'Str'); | |
| 30 | 21 | has 'encoding' => (is => 'rw', isa => 'Str'); | |
| 31 | 21 | has 'maxSeats' => (is => 'rw', isa => 'Int'); | |
| 32 | 21 | has 'name' => (is => 'rw', isa => 'Str'); | |
| 33 | 21 | has 'seats' => (is => 'rw', isa => 'Int'); | |
| 34 | 21 | has 'port' => (is => 'rw', isa => 'Int'); | |
| 35 | 21 | has 'version' => (is => 'rw', isa => 'Str'); | |
| 36 | 21 | has 'lastTime' => (is => 'rw', isa => 'HiResDate'); | |
| 37 | # | ||
| 38 | # The following are introduced in Elluminate Live 9.5 (ELM 3.0). | ||
| 39 | # These are currently only supported as references, but may be | ||
| 40 | # promoted to objects in later versions of Elive. | ||
| 41 | # | ||
| 42 | 21 | has 'sessions' => (is => 'rw', isa => 'Ref'); | |
| 43 | 21 | has 'serverStatus' => (is => 'rw', isa => 'Ref'); | |
| 44 | 21 | has 'iNetAddress' => (is => 'rw', isa => 'Ref'); | |
| 45 | |||
| 46 | =head1 METHODS | ||
| 47 | |||
| 48 | =cut | ||
| 49 | |||
| 50 | =head2 get | ||
| 51 | |||
| 52 | my $server = Elive::Entity::ServerDetails->get(); | ||
| 53 | printf("server %s is running Elluminate Live! version %s\n", $server->name, $server->version); | ||
| 54 | |||
| 55 | =cut | ||
| 56 | |||
| 57 | =head2 list | ||
| 58 | |||
| 59 | my $servers = Elive::Entity::ServerDetails->list(); | ||
| 60 | |||
| 61 | foreach my $server (@$servers) { | ||
| 62 | printf("server %s is running Elluminate Live! version %s\n", $server->name, $server->version); | ||
| 63 | } | ||
| 64 | |||
| 65 | The C<list> method can be used when your site has multiple session servers. | ||
| 66 | |||
| 67 | =cut | ||
| 68 | |||
| 69 | 21 | 1; | |