Tuxedo::Admin::Service

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);

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

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.

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();
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);
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');
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');
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.
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');