SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST

# URI:Authority:ServerBased

### Import List

        ADT:StringBuffer
        Exception
        Exception
        Object
        Object
        TextRider
        URI

Class List
Authority | Server-based authority component of an URI.

Class Summary: Authority [Detail]
      +---URI.Authority
           |
           +--URI:Authority:ServerBased.Authority
Server-based authority component of an URI.
Field Summary
defaultPort-: Port Default port.
host-: STRING Host part.
port-: Port Port number.
userinfo-: STRING Userinfo from authority component.
Constructor Summary
Init(Authority, STRING, STRING, Port, Port)
New(STRING, STRING, Port, Port): Authority Creates a new server-based authority component.
Method Summary
Append(StringBuffer) Appends the textual representation of the authority component auth to the string sb.
Clone(): Authority Creates a deep copy of the authority component referenced by auth.
Copy(Authority) Copies contents of source auth to target dest.
ParseAuthority(CharsLatin1, Offset) Parses the authority component str of an hierarchical URI.
WriteXML(Writer) Writes an XML fragment describing the authority component to the writer w.
Inherited Methods
From URI.Authority: Append, Clone, Copy, ParseAuthority, WriteXML

Type Summary
Port = LONGINT

Class Detail: Authority

Field Detail

### defaultPort

    FIELD defaultPort-: Port

> Default port. If the URI's authority component does not include a port number, this value is used instead.

### host

    FIELD host-: STRING

> Host part. This is never NIL.

### port

    FIELD port-: Port

> Port number. If the port is part of the authority component, this field holds this number. Otherwise, it is set to defaultPort.

### userinfo

    FIELD userinfo-: STRING

> Userinfo from authority component. NIL if no userinfo is given.

Constructor Detail

### Init

    PROCEDURE Init(auth: Authority;
                   userinfo: STRING;
                   host: STRING;
                   port: Port;
                   defaultPort: Port)

### New

    PROCEDURE New(userinfo: STRING;
                  host: STRING;
                  port: Port;
                  defaultPort: Port): Authority

> Creates a new server-based authority component. The arguments userinfo, host, port, and defaultPort are used to initialize the corresponding fields of a new instance of Authority.

> Pre-condition: host must not be NIL.

Method Detail

### Append

    PROCEDURE (auth: Authority) Append(sb: StringBuffer)

> Appends the textual representation of the authority component auth to the string sb.

> [Description inherited from Append]

> Redefines: Append

### Clone

    PROCEDURE (auth: Authority) Clone(): Authority

> Creates a deep copy of the authority component referenced by auth.

> [Description inherited from Clone]

> Redefines: Clone

### Copy

    PROCEDURE (auth: Authority) Copy(dest: Authority)

> Copies contents of source auth to target dest.

> Pre-condition: The dynamic type of dest is an extension of the dynamic type of auth.

> [Description inherited from Copy]

> Redefines: Copy

### ParseAuthority

    PROCEDURE (auth: Authority) ParseAuthority(str: CharsLatin1;
                             offset: Offset)
      RAISES ParseError;

> Parses the authority component str of an hierarchical URI. On success, the data is stored in the authority object auth and the result is NIL. In case of error, a message object is returned and auth is not modified. A character position in an error message refers to an index in str, incremented by the value of offset.

> [Description inherited from ParseAuthority]

> Redefines: ParseAuthority

### WriteXML

    PROCEDURE (auth: Authority) WriteXML(w: Writer)

> Writes an XML fragment describing the authority component to the writer w.

> [Description inherited from WriteXML]

> Redefines: WriteXML

Type Detail

### Port

    TYPE Port = LONGINT