Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

/var/sites/help-site.com/auto/tmp/CPAN/9677/Tuxedo-Admin-0.08/lib/Tuxedo/Admin/Service.pm

/var/sites/help-site.com/auto/tmp/CPAN/9677/Tuxedo-Admin-0.08/lib/Tuxedo/Admin/Service.pm


Tuxedo::Admin::Service


SYNOPSIS


  use Tuxedo::Admin;

  $admin = new Tuxedo::Admin;

  $service = $admin->service('TO_UPPER', 'APP_GRP_1');

  print $service->servicename(), "\t", 

        $service->srvgrp(), "\t",

        $service->rqaddr(), "\n";

  $rc = $service->suspend() if ($self->state() eq 'ACTIVE');

  $service->deactivate() unless ($rc < 0);

    

=head1 DESCRIPTION

Provides methods to query, remove and update a specific Tuxedo service.


INITIALISATION

Tuxedo::Admin::Service objects are not instantiated directly. Instead they are created via the service() method of a Tuxedo::Admin object.

Example:


  $service = $admin->service('TO_UPPER','APP_GRP_1');

This applies both for existing services and for new services that are being created.


METHODS

remove()

Removes the service.


  $rc = $service->remove();

Croaks if the service is active or if the required servicename and srvgrp parameters are not set. $rc is non-negative on success.

Example:


  $service = $admin->service('TO_UPPER','APP_GRP_1');

  

  warn "Can't remove a service while it is active.\n"

    unless ($service->state() eq 'INACTIVE');

  

  $rc = $service->remove() if ($service->state() eq 'INACTIVE');

  print "hasta la vista baby!" unless ($rc < 0);

  

  $admin->print_status();

  

=head2 update()

Updates the service configuration with the values of the current object.


  $rc = $service->update();

Croaks if the required servicename and srvgrp parameters are not set. When the service is active it may also be necessary for the srvid and rqaddr parameters to be set. $rc is non-negative on success.

Example:


  $service = $admin->service('TO_UPPER', 'APP_GRP_1');

  $service->rqaddr('UPPER')

  

  $rc = $service->update();

  $admin->print_status(*STDERR);

  

=head2 activate()

Activates the service.


  $rc = $service->activate();

Croaks if the service is active or if the required servicename and srvgrp parameters are not set. $rc is non-negative on success.

Example:


  $service = $admin->service('TO_UPPER', 'APP_GRP_1');

  $rc = $service->active()

    if ($service->state() ne 'ACTIVE');

  

=head2 suspend()

Suspends the service.


  $rc = $service->suspend();

Croaks if the service is not active or if the required servicename and srvgrp parameters are not set. $rc is non-negative on success.

Example:


  $service = $admin->service('TO_UPPER', 'APP_GRP_1');

  $rc = $service->suspend() 

    if ($service->state() eq 'ACTIVE');

  

=head2 deactivate()

Deactivates the service.


  $rc = $service->deactivate();

Croaks if the service is not suspended or if the required servicename and srvgrp parameters are not set. $rc is non-negative on success.

get/set methods

The following methods are available to get and set the service parameters. If an argument is provided then the parameter value is set to be the argument value. The value of the parameter is returned.

Example:


  # Get the service request queue name

  print $service->rqaddr(), "\n";

  # Set the service request queue name

  $service->rqaddr('GWTDOMAIN');
autotran()
buftype()
encryption_required()
grpno()
lmid()
load()
prio()
routingname()
rqaddr()
servicename()
signature_required()
srvgrp()
srvid()
state()
svcrnam()
svctimeout()
svctype()
trantime()
Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy