GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ORB::ORBOriginator Class Reference

#include <ORB.H>

Inheritance diagram for ORB::ORBOriginator:
Inheritance graph
[legend]
Collaboration diagram for ORB::ORBOriginator:
Collaboration graph
[legend]

Public Member Functions

 ORBOriginator (int argc, char *argv[], string transportNameIn)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, int basePortDifferent)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, const vector< pair< string, string > > extraProperties)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, const vector< pair< string, string > > extraProperties, int basePortDifferent)
 
virtual ~ORBOriginator (void)
 Destructor. More...
 
void shutdown (const Ice::Current &cur)
 
void addClass (Ice::ObjectPtr objectToORB, const string &name)
 
void waitForShutdown (void)
 
- Public Member Functions inherited from ORB::ORBBase
 ORBBase (void)
 Constructor using ORB_DEFAULT_BASEPORT as the starting base network port. More...
 
 ORBBase (int basePortDifferent)
 
int getPortOffset (void)
 
void removePortOffset (int whichOffset)
 
int getTCPUDPPort (int portOffset)
 
int getSSLPort (int portOffset)
 
int getBasePort (void)
 
string generateEndPoint (const string &transportName, std::string &ipAddress, int &portOffset)
 
string generateEndPoint (string &transportName, string ipAddress, int portOffset)
 

Protected Member Functions

 ORBOriginator (int argc, char *argv[], string transportNameIn, string ipAddress)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, string ipAddress, const vector< pair< string, string > > extraProperties)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, string ipAddress, int basePortDifferent)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, string ipAddress, const vector< pair< string, string > > extraProperties, int basePortDifferent)
 
void initialise (int argc, char *argv[], string transportNameIn, string ipAddress, const vector< pair< string, string > > extraProperties)
 
void initialiseAdapter (void)
 
void getObjectPointer (const string &name, Ice::ObjectPtr &objectPointer, const Ice::Current &cur)
 

Protected Attributes

int portOffset
 The port offset of this application layer. More...
 
string hostAddress
 The hostname or IP address of the node to connect to, empty for the originator and set for the replicator. More...
 
string transportName
 Zeroc ICE application layer name. More...
 
Ice::CommunicatorPtr communicator
 Resident communicator. More...
 
Ice::ObjectAdapterPtr adapterPtr
 Resident adapter. More...
 

Detailed Description

Sets up an originator which others can connect to as replicators.

The general idea is that any local classes can be added to the ORB network application layer using the ORBOriginator::addClass method. Once these classes have been added to the ORB network, the ORBReplicator class can be used to access them on the other end of the network. Maintains required resident classes (such as the communicator and adapter)

NOTE: Before using this class, you will require an install of the ZeroC ICE system (see http://www.zeroc.com/download.html for binary installers) On Debian derived systems : sudo apt-get install zeroc-ice34 libzeroc-ice34-dev ice34-translators

NOTE: If your version of slice2cpp generates errors when executing slice2cpp on the ORBICE.ice file, then you will need to upgrade to version 3.5 of the Zeroc ICE software.

To use this class and the ice files, look at the Makefile for how to generate C++ code from the network protocol .ice files and then how to compile them.

Definition at line 207 of file ORB.H.

Constructor & Destructor Documentation

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress 
)
inlineprotected
Generates a new ZeroC ICE application layer to connect to the originator (used by the ORBReplicator)
Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
ipAddressthe host to connect to whos endpoints should be open and ready for connecting (used by ORBReplicator)

Definition at line 222 of file ORB.H.

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
const vector< pair< string, string > >  extraProperties 
)
inlineprotected
Generates a new ZeroC ICE application layer to connect to the originator (used by the ORBReplicator)
Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
ipAddressthe host to connect to whos endpoints should be open and ready for connecting (used by ORBReplicator)
extraPropertiesExtra communicator properties to initialise the communicator with

Definition at line 233 of file ORB.H.

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
int  basePortDifferent 
)
inlineprotected
Generates a new ZeroC ICE application layer to connect to the originator (used by the ORBReplicator)
Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
ipAddressthe host to connect to whos endpoints should be open and ready for connecting (used by ORBReplicator)
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 244 of file ORB.H.

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
const vector< pair< string, string > >  extraProperties,
int  basePortDifferent 
)
inlineprotected
Generates a new ZeroC ICE application layer to connect to the originator (used by the ORBReplicator)
Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
ipAddressthe host to connect to whos endpoints should be open and ready for connecting (used by ORBReplicator)
extraPropertiesExtra communicator properties to initialise the communicator with
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 256 of file ORB.H.

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn 
)
inline
Generates a new application layer originator for class Object Broking

The endpoints of the application layer are derived by ORBBase. The ice configuration transportName.Control and transportName.Endpoints are auto-generated

Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints

Definition at line 311 of file ORB.H.

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
int  basePortDifferent 
)
inline
Generates a new application layer originator for Object Broking

The endpoints of the application layer are derived by ORBBase. The ice configuration transportName.Control and transportName.Endpoints are auto-generated

Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 324 of file ORB.H.

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
const vector< pair< string, string > >  extraProperties 
)
inline
Generates a new application layer originator for class Object Broking

The endpoints of the application layer are derived by ORBBase. The ice configuration transportName.Control and transportName.Endpoints are auto-generated

Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
extraPropertiesExtra communicator properties to initialise the communicator with

Definition at line 337 of file ORB.H.

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
const vector< pair< string, string > >  extraProperties,
int  basePortDifferent 
)
inline
Generates a new application layer originator for Object Broking

The endpoints of the application layer are derived by ORBBase. The ice configuration transportName.Control and transportName.Endpoints are auto-generated

Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
extraPropertiesExtra communicator properties to initialise the communicator with
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 351 of file ORB.H.

virtual ORB::ORBOriginator::~ORBOriginator ( void  )
inlinevirtual

Destructor.

Definition at line 357 of file ORB.H.

Member Function Documentation

void ORB::ORBOriginator::addClass ( Ice::ObjectPtr  objectToORB,
const string &  name 
)
inline
Make the network aware that a new class is available to the ORB application layer
Parameters
objectToORBThe calss which will be added to the ORB application layer
nameThe name to give to the network. This name must be unique

Definition at line 374 of file ORB.H.

void ORB::ORBOriginator::getObjectPointer ( const string &  name,
Ice::ObjectPtr &  objectPointer,
const Ice::Current &  cur 
)
inlineprotected
This method implements the netowrk protocol ORB::ORBICE::getObjectPointer.

The protocol for this method is specified in the ORBICE.ice network protocol specification file.

Definition at line 296 of file ORB.H.

void ORB::ORBOriginator::initialise ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
const vector< pair< string, string > >  extraProperties 
)
inlineprotected
Generates a new ZeroC ICE application layer originator

The endpoints of the application layer are derived by ORBBase. The ice configuration transportName.Control and transportName.Endpoints are auto-generated

Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
ipAddressthe host to connect to whos endpoints should be open and ready for connecting (used by ORBReplicator)

Definition at line 268 of file ORB.H.

void ORB::ORBOriginator::initialiseAdapter ( void  )
inlineprotected

Creates an adapter, as required by the ORBOriginator but not the ORBReplicator

Definition at line 286 of file ORB.H.

void ORB::ORBOriginator::shutdown ( const Ice::Current &  cur)
inline
An ICE network call to shutdown the communicator
Parameters
curThe current ICE object

Definition at line 366 of file ORB.H.

void ORB::ORBOriginator::waitForShutdown ( void  )
inline

Run the ICE thread

Definition at line 384 of file ORB.H.

Member Data Documentation

Ice::ObjectAdapterPtr ORB::ORBOriginator::adapterPtr
protected

Resident adapter.

Definition at line 214 of file ORB.H.

Ice::CommunicatorPtr ORB::ORBOriginator::communicator
protected

Resident communicator.

Definition at line 213 of file ORB.H.

string ORB::ORBOriginator::hostAddress
protected

The hostname or IP address of the node to connect to, empty for the originator and set for the replicator.

Definition at line 210 of file ORB.H.

int ORB::ORBOriginator::portOffset
protected

The port offset of this application layer.

Definition at line 209 of file ORB.H.

string ORB::ORBOriginator::transportName
protected

Zeroc ICE application layer name.

Definition at line 212 of file ORB.H.


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