Specification of package Corba.Transport
========================================================================= --
=== === --
=== Top Graph'X CORBA Implementation === --
=== === --
=== Copyright (c) 2001, Top Graph'X. === --
=== === --
=== --- Copyright Notice --- === --
=== === --
=== This software is protected as an unpublished work under the === --
=== Copyright Act of 1976. All rights reserved. Top Graph'X. === --
=== === --
========================================================================= --
modif_{0} : JM : 07/02/02 : definition of new classes : Connected and Connection_Less
with Tgx.Ios ;
with Corba_Ios ;
with Corba.Iop ;
package Corba.Transport is
subtype Protocol_Name is Standard.String (1 .. 3) ;
for IIOP profile, it is 'TCP', profile Id 0
for TGX shared memory profile,
it is 'SHM', profile Id Corba.Iop.Tag_Memory_Iop
for TGX multicast UDP profile,
it is 'MUD', profile Id Corba.Iop.Tag_Multicast_Iop
Every profile should have the following structure
- profile version
- Transport information (e.g. host name and tcp port for IIOP)
- profile key (or equivalent information)
- profile components
type Object is abstract tagged
record
Protocol : Protocol_Name ;
Profile : Corba.Iop.Profile_Id ;
Is_Oneway : Boolean := False ;
end record ;
type Object_Ptr is access all Object'class ;
Bad_Url : exception ;
No_Such_Transport : exception ;
Transport_Already_Registered : exception ;
Create a data connection corresponding to the given URL
function Connection ( Self : access Object ;
Url : in Standard.String)
return Tgx.Ios.Io_Connection_Access is abstract ;
Build the transport IOR profile header for the given URL
It is aligned on a four-bytes boundary and contains only the transport
information (e.g. host name and TCP port number for IIOP profile)
function Get_Profile_Header
( Self : access Object ;
Url : in Standard.String )
return Corba_Ios.Stream_Element_Array is abstract ;
Extract the URL from the IOR stream
Index is aligned on a four-bytes boundary and points at the beginning
of the transport information
(e.g. host name and TCP port number for IIOP profile)
Index is updated to the last byte index of the transport information
function Get_Url ( Self : access Object ;
Swap : in Boolean ; Indicate the need to swap bytes
Data : in Corba_Ios.Stream_Element_Array ;
Index : access Corba_Ios.Stream_Element_Offset)
return Standard.String is abstract ;
modif_{0}
type Connected is abstract new Object with null record ;
type Connected_Access is access all Connected'class ;
Create a server connection corresponding to the given URL
function Create_Server ( Self : access Connected ;
Url : in Standard.String)
return Tgx.Ios.Io_Server_Access is abstract ;
type Connection_Less is abstract new Object with null record ;
type Connection_Less_Access is access all Connection_Less'class ;
Create a Receiver connection corresponding to the given URL
function Create_Receiver ( Self : access Connection_Less ;
Url : in Standard.String)
return Tgx.Ios.Io_Connection_Access is abstract ;
end_{0}
-------------------------------------
Transport independant subprograms --
-------------------------------------
To put a given transport in the transports database
procedure Register (Self : in Object_Ptr) ;
Find the transport object corresponding to the given URL, and call its
Connection primitive if no connection already exists,
otherwise the existing connection is returned
function Connection (Url : in Standard.String)
return Tgx.Ios.Io_Connection_Access ;
Find the transport object corresponding to the given URL,
and call its Create_Server primitive
function Create_Server (Url : in Standard.String)
return Tgx.Ios.Io_Server_Access ;
To check if an url corresponds to a local server
function Is_Local (Url : in Standard.String) return Boolean ;
modif_{0}
Find the transport object corresponding to the given URL,
and call its Create_Receiver primitive
function Create_Receiver (Url : in Standard.String)
return Tgx.Ios.Io_Connection_Access ;
end_{0}
Find the transport object corresponding to the given Profile_Id
function Get_Transport ( Profile : in Corba.Iop.Profile_Id )
return Object_Ptr ;
Find the transport object corresponding to the given Name
function Get_Transport ( Name : in Protocol_Name )
return Object_Ptr ;
Close all known connections
procedure Close_All_Connections ;
Open_Servers : Boolean := True ;
end Corba.Transport ;
List of definition uses
This page was generated by PrismTech's ada2html on Friday Mai 12 2006 16:18