Keith Burdis > Tuxedo-Admin-0.08 > Tuxedo::Admin::LocalAccessPoint

Download:
Tuxedo-Admin-0.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

Tuxedo::Admin::LocalAccessPoint

SYNOPSIS ^

  use Tuxedo::Admin;

  $admin = new Tuxedo::Admin;

  $local_access_point = $admin->local_access_point('ACCESS_POINT_NAME');
  
  if ($local_access_point->exists())
  {
    print "Connection Policy: ",
          $local_access_point->dmconnection_policy(), "\n";
  
    $local_access_point->dmconnection_policy('ON_DEMAND');
    $rc = $local_access_point->update();
  }

DESCRIPTION ^

Provides methods to query, add, remove and update a local access point.

INITIALISATION ^

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

  $local_access_point =
    $admin->local_access_point('ACCESS_POINT_NAME');

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

METHODS ^

exists()

Used to determine whether or not the local access point exists in the current Tuxedo application.

  if ($local_access_point->exists())
  {
    ...
  }

Returns true if the local access point exists.

add()

Adds the local access point to the current Tuxedo application.

  $rc = $local_access_point->add();

Croaks if the local access point already exists or if the required dmaccesspoint, dmaccesspointid and dmsrvgroup parameters are not set. If $rc is negative then an error occurred. If successful then the exists() method will return true.

Example:

  $local_access_point = $admin->local_access_point('LOCAL2');
  unless ($local_access_point->exists())
  {
    $local_access_point->dmaccesspointid('LOCAL2_ID');
    $local_access_point->dmsrvgroup('GW_GRP_2');
    $rc = $local_access_point->add();
    $admin->print_status();    
    die if ($rc < 0);

    $tdomain1 = $admin->tdomain('LOCAL2', 'hostname:8765');
    $rc = $tdomain1->add();
    $admin->print_status();    
    die if ($rc < 0);

    $tdomain2 = $admin->tdomain('LOCAL2', 'hostname:8766');
    $rc = $tdomain2->add();
    $admin->print_status();
    die if ($rc < 0);
  }
  else
  {
    print STDERR "Already exists!\n";
  }  

update()

Updates the local access point configuration with the values of the current object.

  $rc = $local_access_point->update();

Croaks if the local access point does not exist or if the required dmaccesspoint parameter is not set. If $rc is negative then an error occurred.

Example:

  $local_access_point = $admin->local_access_point('LOCAL2');
  if ($local_access_point->exists() and
      ($local_access_point->dmconnection_policy() ne 'ON_DEMAND'))
  {
    $local_access_point->dmconnection_policy('ON_DEMAND');
    $local_access_point->update();
  }

remove()

Removes the local access point from the current Tuxedo application.

  $rc = $local_access_point->remove();

Croaks if the local access point does not exist or if the required dmaccesspoint parameter is not set. If $rc is negative then an error occurred.

Example:

  $local_access_point = $admin->local_access_point('LOCAL2');
  if ($local_access_point->exists())
  {
    $local_access_point->remove();
  }

get/set methods

The following methods are available to get and set the local access point 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 connection policy
  print $local_access_point->dmconnection_policy(), "\n";

  # Set the connection policy
  $local_access_point->dmconnection_policy('ON_DEMAND');
dmaccesspoint()
dmaccesspointid()
dmauditlog()
dmblob_shm_size()
dmblocktime()
dmcodepage()
dmconnection_policy()
dmconnprincipalname()
dmmachinetype()
dmmaxraptran()
dmmaxretry()
dmmaxtran()
dmretry_interval()
dmsecurity()
dmsrvgroup()
dmtlogdev()
dmtlogname()
dmtlogsize()
dmtype()
state()