IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Web.WebServiceLauncher< ServiceType > Class Template Reference

Generic class for launching web services. More...

+ Inheritance diagram for IG.Web.WebServiceLauncher< ServiceType >:
+ Collaboration diagram for IG.Web.WebServiceLauncher< ServiceType >:

Public Member Functions

void Launch ()
 Creates the web service and launches it. More...
 
void LaunchInNewThread ()
 Creates the web service and launches it in a new theread. More...
 

Static Public Attributes

static int DefaultOutputLevel = 1
 Default output level for objects of this class. More...
 
static int DefaultMinSleepMs = 5
 Default value for minimal sleeping time, in milliseconds, when waiting for a condition to be fulfilled. More...
 
static int DefaultMaxSleepMs = 500
 Default value for maximal sleeping time, in milliseconds, when waiting for a condition to be fulfilled. More...
 
static double DefaultMaxRelativeLatency = 0.05
 Default value for maximal relative latency, in milliseconds, when waiting for a condition to be fulfilled. More...
 
static bool DefaultSleepFirst = false
 Default value for a flag indicating whether sleep is performed first, when waiting for a condition to be fulfilled. More...
 
static string DefaultBaseUrl = "http://localhost:8080/"
 

Protected Member Functions

virtual void Wait (ConditionDelegateBase condition)
 Waits until the specified condition is fulfilled, i.e. untill the conditionreturns true. More...
 

Protected Attributes

object _lock = new object()
 
int _outputLevel = DefaultOutputLevel
 
bool _stopService = false
 
bool _busy = false
 
bool _busySetOutside = false
 
WaitCondition _waiter
 
ServiceType _service
 
string _url
 
Thread _thread = null
 

Properties

object Lock [get]
 Gets an instantiated object that is used for locking of the current object. More...
 
int OutputLevel [get, set]
 
bool StopService [get, set]
 Flag indicating that the service syould be stopped if it is running. More...
 
bool Busy [get, set]
 The busy flag. When this is set the service can not be launched. More...
 
bool BusySetOutside [get, protected set]
 Whether a web service can be set when the busy flag is switched on. More...
 
WaitCondition Waiter [get]
 Object that performs waiting until a particular condition is fulfilled. More...
 
int MinSleepMs [get, set]
 Minimal sleeping time, in milliseconds, when waiting a condition to be fulfilled. More...
 
int MaxSleepMs [get, set]
 Maximal sleeping time, in milliseconds, when waiting a condition to be fulfilled. More...
 
double MaxRelativeLatencyMs [get, set]
 Maximal relative latency when waiting a condition to be fulfilled. More...
 
bool SleepFirst [get, set]
 Whether sleeping is performed first when waiting for a condition to be fulfilled. More...
 
ServiceType Service [get, set]
 
string Url [get, set]
 
- Properties inherited from IG.Lib.ILockable
object Lock [get]
 

Detailed Description

Generic class for launching web services.

Template Parameters
ServiceClass
Type Constraints
ServiceType :WebService 
ServiceType :IWSBase 
ServiceType :new() 

Member Function Documentation

virtual void IG.Web.WebServiceLauncher< ServiceType >.Wait ( ConditionDelegateBase  condition)
inlineprotectedvirtual

Waits until the specified condition is fulfilled, i.e. untill the conditionreturns true.

Parameters
conditionDelegate that returns true when stipping condition is fulfilled and false otherwise.

References IG.Lib.WaitCondition.ConditionDelegate.

void IG.Web.WebServiceLauncher< ServiceType >.Launch ( )
inline

Creates the web service and launches it.

References ConditionDelegateBase().

void IG.Web.WebServiceLauncher< ServiceType >.LaunchInNewThread ( )
inline

Creates the web service and launches it in a new theread.

References ConditionDelegateBase().

Member Data Documentation

object IG.Web.WebServiceLauncher< ServiceType >._lock = new object()
protected
int IG.Web.WebServiceLauncher< ServiceType >.DefaultOutputLevel = 1
static

Default output level for objects of this class.

int IG.Web.WebServiceLauncher< ServiceType >._outputLevel = DefaultOutputLevel
protected
bool IG.Web.WebServiceLauncher< ServiceType >._stopService = false
protected
bool IG.Web.WebServiceLauncher< ServiceType >._busy = false
protected
bool IG.Web.WebServiceLauncher< ServiceType >._busySetOutside = false
protected
int IG.Web.WebServiceLauncher< ServiceType >.DefaultMinSleepMs = 5
static

Default value for minimal sleeping time, in milliseconds, when waiting for a condition to be fulfilled.

int IG.Web.WebServiceLauncher< ServiceType >.DefaultMaxSleepMs = 500
static

Default value for maximal sleeping time, in milliseconds, when waiting for a condition to be fulfilled.

double IG.Web.WebServiceLauncher< ServiceType >.DefaultMaxRelativeLatency = 0.05
static

Default value for maximal relative latency, in milliseconds, when waiting for a condition to be fulfilled.

bool IG.Web.WebServiceLauncher< ServiceType >.DefaultSleepFirst = false
static

Default value for a flag indicating whether sleep is performed first, when waiting for a condition to be fulfilled.

WaitCondition IG.Web.WebServiceLauncher< ServiceType >._waiter
protected
ServiceType IG.Web.WebServiceLauncher< ServiceType >._service
protected
string IG.Web.WebServiceLauncher< ServiceType >.DefaultBaseUrl = "http://localhost:8080/"
static
string IG.Web.WebServiceLauncher< ServiceType >._url
protected
Thread IG.Web.WebServiceLauncher< ServiceType >._thread = null
protected

Property Documentation

object IG.Web.WebServiceLauncher< ServiceType >.Lock
get

Gets an instantiated object that is used for locking of the current object.

int IG.Web.WebServiceLauncher< ServiceType >.OutputLevel
getset
bool IG.Web.WebServiceLauncher< ServiceType >.StopService
getset

Flag indicating that the service syould be stopped if it is running.

bool IG.Web.WebServiceLauncher< ServiceType >.Busy
getset

The busy flag. When this is set the service can not be launched.

bool IG.Web.WebServiceLauncher< ServiceType >.BusySetOutside
getprotected set

Whether a web service can be set when the busy flag is switched on.

WaitCondition IG.Web.WebServiceLauncher< ServiceType >.Waiter
getprotected

Object that performs waiting until a particular condition is fulfilled.

int IG.Web.WebServiceLauncher< ServiceType >.MinSleepMs
getset

Minimal sleeping time, in milliseconds, when waiting a condition to be fulfilled.

int IG.Web.WebServiceLauncher< ServiceType >.MaxSleepMs
getset

Maximal sleeping time, in milliseconds, when waiting a condition to be fulfilled.

double IG.Web.WebServiceLauncher< ServiceType >.MaxRelativeLatencyMs
getset

Maximal relative latency when waiting a condition to be fulfilled.

bool IG.Web.WebServiceLauncher< ServiceType >.SleepFirst
getset

Whether sleeping is performed first when waiting for a condition to be fulfilled.

ServiceType IG.Web.WebServiceLauncher< ServiceType >.Service
getset
string IG.Web.WebServiceLauncher< ServiceType >.Url
getset

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