VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
List of all members
Com::Vmware::Vapi::Protocol::HttpConfiguration::Builder Class Reference

## Avaliable Methods
private method | _validate ()
public method | get_config ()
public method | set_io_thread_count ()
public method | set_library_type ()
public method | new ()
public method | set_so_timeout ()
public method | set_ssl_configuration ()

## Detailed Description

Inner class for building HttpConfiguration class

## Member Function Documentation

private method Com::Vmware::Vapi::Protocol::HttpConfiguration::Builder::_validate | ( |  | ) |

Validates whether IO thread count setting is supported for transport based on library [Private method]

Parameters

  None |

Return values

  None | Code: click to view # Number of lines of code in _validate: 15 sub _validate { my ( $self, %args ) = @_; if ( !$self->{'io_thread_count_builder'} && !$self->{'library_type_builder'} eq "USE_CONSTANT_LATER_IF_ANY_3RD_PARTY_LIB_IS_USED" ) { my $message_factory = Com::Vmware::Vapi::l10n::Runtime::get_runtime_message_factory(); my $msg = $message_factory->get_message( id => 'Com.Vmware.Vapi.Protocol.HttpConfiguration.IllegalStateException', args => [$self->{'library_type_builder'}] ); throw IllegalStateException( $msg->str() ); } }

public method Com::Vmware::Vapi::Protocol::HttpConfiguration::Builder::get_config | ( |  | ) |

Get HttpConfiguration object

Parameters

  None |

Return values

  HttpConfiguration | Returns object of HttpConfiguration class

Code:
click to view
# Number of lines of code in get_config: 16
sub get_config {
my ( $self, %args ) = @_;
_validate();
# Assuming current number of processors available to be 1
my $ioThreads =
( !$self->{'io_thread_count_builder'} )
? 1
: $self->{'io_thread_count_builder'};
return Com::Vmware::Vapi::Protocol::HttpConfiguration->new(
library_type => $self->{'library_type_builder'},
ssl_config => $self->{'ssl_config_builder'},
io_thread_count => $ioThreads,
sso_timeout => $self->{'so_timeout_builder'}
);
}

public method Com::Vmware::Vapi::Protocol::HttpConfiguration::Builder::new | ( |  | ) |

Constructor

Parameters

  None |

Return values

  Blessed object | Code: click to view # Number of lines of code in new: 9 sub new { my ( $class, %args ) = @_; my $self = {}; # TODO: NEEDS TO INITIALIZE $self->{'library_type_builder'} VARIABLE WITH THE CONSTANT # DEFINED IN THE 3RD PARTY LIBRARY "constant" TYPE ENUM return bless( $self, $class ); }

public method Com::Vmware::Vapi::Protocol::HttpConfiguration::Builder::set_io_thread_count | ( |  | ) |

Defines the number of I/O dispatch threads to be used by the I/O reactor of the third-party HTTP library.

Parameters

  io_thread_count_builder | number of I/O threads Defaults to the count of the processors on the machine Must be larger than zero

Return values

  Builder | Returns the current object of Builder class

Code:
click to view
# Number of lines of code in set_io_thread_count: 8
sub set_io_thread_count {
my ( $self, %args ) = @_;
$self->{'io_thread_count_builder'} = $args{'io_thread_count_builder'};
#returns the current object
return $self;
}

public method Com::Vmware::Vapi::Protocol::HttpConfiguration::Builder::set_library_type | ( |  | ) |

Sets the type of the HTTP library

Parameters

  library_type_builder | HTTP library flavor

Return values

  Builder | Returns the current object of Builder class

Code:
click to view
# Number of lines of code in set_library_type: 8
sub set_library_type {
my ( $self, %args ) = @_;
$self->{'library_type_builder'} = $args{'library_type_builder'};
#returns the current object
return $self;
}

public method Com::Vmware::Vapi::Protocol::HttpConfiguration::Builder::set_so_timeout | ( |  | ) |

Sets the amount of time the client should wait for a response before timing out

Parameters

  so_timeout_builder | time in milliseconds Zero timeout means wait forever Default is zero Must not be negative

Return values

  Builder | Returns the current object of Builder class

Code:
click to view
# Number of lines of code in set_so_timeout: 8
sub set_so_timeout {
my ( $self, %args ) = @_;
$self->{'so_timeout_builder'} = $args{'so_timeout_builder'};
#returns the current object
return $self;
}

public method Com::Vmware::Vapi::Protocol::HttpConfiguration::Builder::set_ssl_configuration | ( |  | ) |

Sets the SSL configuration

Parameters

  ssl_config_builder |

Return values

  Builder | Returns the current object of Builder class

Code:
click to view
# Number of lines of code in set_ssl_configuration: 8
sub set_ssl_configuration {
my ( $self, %args ) = @_;
$self->{'ssl_config_builder'} = $args{'ssl_config_builder'};
#returns the current object
return $self;
}

The documentation for this class was generated from the following file:

- Com/Vmware/Vapi/Protocol/HttpConfiguration.pm