library: libNetx
#include "TXUrl.h"

TXUrl


class description - source file - inheritance tree (.pdf)

class TXUrl

Inheritance Chart:
TXUrl
    private:
void CheckPort(TString& list) void ConvertDNSAliases(vector<TUrl*,allocator<TUrl*> >&, TString, TString) Bool_t ConvertSingleDNSAlias(vector<TUrl*,allocator<TUrl*> >&, TString, TString) public:
TXUrl(TString) TXUrl(const TXUrl&) virtual ~TXUrl() static TClass* Class() TUrl* GetARandomUrl() const char* GetFile() const TUrl* GetNextUrl() TString GetServers() virtual TClass* IsA() const Bool_t IsValid() TXUrl& operator=(const TXUrl&) void Rewind() virtual void ShowMembers(TMemberInspector& insp, char* parent) void ShowUrls() Int_t Size() virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
vector<TUrl*,allocator<TUrl*> > fUrlArray vector<TUrl*,allocator<TUrl*> > fTmpUrlArray TString fPathName Bool_t fIsValid TRandom fRndgen

Class Description


TXUrl(TString Urls) : fIsValid(kTRUE)
 A container for multiple urls.
 It creates an array of multiple urls parsing the argument Urls and
  resolving the DNS aliases

 Urls MUST be in the form:

    root://[username1@]server1:port1[,[username2@]server2:port2, ... ,
           [usernameN@]serverN:portN]/pathfile

 Using the method GetNextUrl() the user can obtain the next TUrl object pointer in the array
 (the array is cyclic).
 Using the method GetARandomUrl() the user can obtain a random TUrl from the array

~TXUrl()

TUrl* GetNextUrl()
 Returns the next TUrl object pointer in the array.
 After the last object is returned, the array is rewind-ed.
 Now implemented as a pick from the tmpUrlArray queue

void Rewind()
 Rebuilds tmpUrlArray, i..e the urls that have to be picked

TUrl* GetARandomUrl()

void ShowUrls()
 Prints the list of urls

void CheckPort(TString &machine)
 Checks the validity of port in the given host[:port]
 Eventually completes the port if specified in the services file

Bool_t ConvertSingleDNSAlias(UrlArray& urls, TString hostname, TString fname)
 Converts a single host[:port] into an array of TUrls.
 The new Turls are appended to the given UrlArray.

void ConvertDNSAliases(UrlArray& urls, TString list, TString fname)
 Given a list of comma-separated host[:port]
 every entry is resolved via DNS into its aliases
 The parameter is overwritten with the processed data



Inline Functions


            TString GetServers()
              Int_t Size()
        const char* GetFile() const
             Bool_t IsValid()
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
              TXUrl TXUrl(const TXUrl&)
             TXUrl& operator=(const TXUrl&)


Author: Alvise Dorigo, Fabrizio Furano
Last update: root/netx:$Name: $:$Id: TXUrl.cxx,v 1.5 2004/12/16 19:23:18 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.