/[cwmp]/google/branches/store-pluggable/lib/CWMP/Server.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/branches/store-pluggable/lib/CWMP/Server.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 133 by dpavlin, Fri Oct 26 19:21:53 2007 UTC revision 134 by dpavlin, Fri Oct 26 20:46:09 2007 UTC
# Line 7  use warnings; Line 7  use warnings;
7  use base qw/Class::Accessor/;  use base qw/Class::Accessor/;
8  __PACKAGE__->mk_accessors( qw/  __PACKAGE__->mk_accessors( qw/
9  port  port
10  store_path  store
11  default_queue  default_queue
12  background  background
13  debug  debug
# Line 30  CWMP::Server - description Line 30  CWMP::Server - description
30    
31    my $server = CWMP::Server->new({    my $server = CWMP::Server->new({
32          port => 3333,          port => 3333,
33          store_path => 'state.db',          store => 'state.db',
34          default_queue => [ qw/GetRPCMethods GetParameterNames/ ],                                                                    default_queue => [ qw/GetRPCMethods GetParameterNames/ ],                                                          
35          background => 1,          background => 1,
36          debug => 1          debug => 1
# Line 44  Options: Line 44  Options:
44    
45  port to listen on  port to listen on
46    
47  =item store_path  =item store
48    
49  path to L<DBM::Deep> database file to preserve state  hash with key C<module> with value C<DBMDeep> if L<CWMP::Store::DBMDeep>
50    is used. Other parametars are optional.
51    
52  =item default_queue  =item default_queue
53    
# Line 72  sub new { Line 73  sub new {
73                          proto => 'tcp',                          proto => 'tcp',
74                          port => $self->port,                          port => $self->port,
75                          default_queue => $self->default_queue,                          default_queue => $self->default_queue,
76                          store_path => $self->store_path,                          store => $self->store,
77                          debug => $self->debug,                          debug => $self->debug,
78                          background => $self->background,                          background => $self->background,
79                  })                  })
# Line 109  sub options { Line 110  sub options {
110          $self->SUPER::options($template);          $self->SUPER::options($template);
111    
112          # new single-value options          # new single-value options
113          foreach my $p ( qw/ store_path debug / ) {          foreach my $p ( qw/ store debug / ) {
114                  $prop->{ $p } ||= undef;                  $prop->{ $p } ||= undef;
115                  $template->{ $p } = \$prop->{ $p };                  $template->{ $p } = \$prop->{ $p };
116          }          }
# Line 139  sub process_request { Line 140  sub process_request {
140          my $session = CWMP::Session->new({          my $session = CWMP::Session->new({
141                  sock => $sock,                  sock => $sock,
142                  queue => $prop->{default_queue},                  queue => $prop->{default_queue},
143                  store_path => $prop->{store_path},                  store => $prop->{store},
144                  debug => $prop->{debug},                  debug => $prop->{debug},
145          }) || confess "can't create session";          }) || confess "can't create session";
146    

Legend:
Removed from v.133  
changed lines
  Added in v.134

  ViewVC Help
Powered by ViewVC 1.1.26