Base Framework
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members

Object Request Broker (ORB). More...

#include <base/rmi/Orb.h>

Inherits Object.

Public Types

enum  NamedObjects { OBJECT_ORB, OBJECT_REGISTRY }
 
enum  EncodingSchemeFlags { INCOMING = 1, OUTGOING = 2 }
 

Public Member Functions

 Orb ()
 
unsigned int getNumberOfEncodings () const noexcept
 
unsigned int getNumberOfSchemes () const noexcept
 
unsigned int getNumberOfFactories () const noexcept
 
unsigned int getNumberOfStubs () const noexcept
 
unsigned int getNumberOfSkeletons () const noexcept
 
unsigned int getNumberOfConnections () const noexcept
 
HashSet< StringgetEncodings () const
 
HashSet< StringgetSchemes () const
 
HashSet< StringgetFactories () const
 
void registerEncoding (Reference< OrbEncoding > encoding, unsigned int flags=INCOMING|OUTGOING)
 
void registerScheme (Reference< OrbScheme > scheme)
 
void registerFactory (Reference< OrbConnectionFactory > factory)
 
void openFactory (const String &identifier)
 
Reference< OrbEncodinggetDefaultEncoding () noexcept
 
template<class POLY >
Reference< POLY > getObject (const String &identifier)
 
void registerSkeleton (Reference< OrbSkeleton > skeleton)
 
void registerSkeleton (const String &name, Reference< base::OrbSkeleton > skeleton)
 
void unregisterSkeleton (Reference< OrbSkeleton > skeleton)
 
String getIdentifier (void *skeleton)
 
void onConnection (Reference< OrbConnection > connection) noexcept
 
void onIncomingConnection (Reference< OrbConnectionFactory > factory, Reference< OrbConnection > connection)
 
unsigned int push (Reference< OrbConnection > connection, const uint8 *buffer, unsigned int size) noexcept
 
void run ()
 
void terminate () noexcept
 
 ~Orb () noexcept
 

Static Public Attributes

static const unsigned int DEFAULT_CONCURRENCY = 16
 

Detailed Description

Object Request Broker (ORB).

Object Request Broker (ORB).

Version
1.0

Member Enumeration Documentation

◆ EncodingSchemeFlags

Flags for use with encoding scheme registration.

Enumerator
INCOMING 

Encoding scheme should be available for incoming trafic.

OUTGOING 

Encoding scheme should be available for outgoing trafic.

Constructor & Destructor Documentation

◆ Orb()

Orb::Orb ( )

Initializes the ORB.

◆ ~Orb()

Orb::~Orb ( )
noexcept

Destroys the orb.

Member Function Documentation

◆ getEncodings()

HashSet<String> Orb::getEncodings ( ) const

Returns the current registered encoding schemes.

◆ getFactories()

HashSet<String> Orb::getFactories ( ) const

Returns the identifiers of the registered factories.

◆ getIdentifier()

String Orb::getIdentifier ( void *  skeleton)

Returns the identifier of the specified skeleton.

◆ getNumberOfConnections()

unsigned int Orb::getNumberOfConnections ( ) const
noexcept

Returns the current number of connections.

◆ getNumberOfEncodings()

unsigned int Orb::getNumberOfEncodings ( ) const
inlinenoexcept

Returns the current number of registered encoding schemes.

◆ getNumberOfFactories()

unsigned int Orb::getNumberOfFactories ( ) const
inlinenoexcept

Returns the current number of registered factories.

◆ getNumberOfSchemes()

unsigned int Orb::getNumberOfSchemes ( ) const
inlinenoexcept

Returns the current number of registered schems.

◆ getNumberOfSkeletons()

unsigned int Orb::getNumberOfSkeletons ( ) const
noexcept

Returns the current number of skeletons.

◆ getNumberOfStubs()

unsigned int Orb::getNumberOfStubs ( ) const
noexcept

Returns the current number of stubs.

◆ getSchemes()

HashSet<String> Orb::getSchemes ( ) const

Returns the current registered schemes.

◆ onConnection()

void Orb::onConnection ( Reference< OrbConnection connection)
noexcept

Invoked on incoming connection (new context).

◆ onIncomingConnection()

void Orb::onIncomingConnection ( Reference< OrbConnectionFactory factory,
Reference< OrbConnection connection 
)

Invoked on incoming connection.

Parameters
factoryThe connection factory.
connectionThe ORB connection.

◆ openFactory()

void Orb::openFactory ( const String identifier)

Opens a factory for the specified end point (e.g. tcpip://localhost:1234).

Parameters
identifierThe identifier of the end point.

◆ push()

unsigned int Orb::push ( Reference< OrbConnection connection,
const uint8 *  buffer,
unsigned int  size 
)
noexcept

Invoked by connection on incoming data.

◆ registerEncoding()

void Orb::registerEncoding ( Reference< OrbEncoding encoding,
unsigned int  flags = INCOMING|OUTGOING 
)

Registers the specified ORB encoding. Flags may be use to register the encoding for assymetric trafic.

Parameters
encodingThe encoding scheme.
flagsThe flags. The default is INCOMING|0UTGOING.

◆ registerFactory()

void Orb::registerFactory ( Reference< OrbConnectionFactory factory)

Registers a connection factory.

Parameters
factoryThe connection factory.

◆ registerScheme()

void Orb::registerScheme ( Reference< OrbScheme scheme)

Registers the specified scheme.

◆ registerSkeleton()

void Orb::registerSkeleton ( Reference< OrbSkeleton skeleton)
inline

Registers the specified skeleton.

◆ run()

void Orb::run ( )

Enters the ORB message dispatch loop.

◆ terminate()

void Orb::terminate ( )
noexcept

Terminates the message dispatch loop.

◆ unregisterSkeleton()

void Orb::unregisterSkeleton ( Reference< OrbSkeleton skeleton)
inline

Unregisters the specified skeleton.

Member Data Documentation

◆ DEFAULT_CONCURRENCY

const unsigned int Orb::DEFAULT_CONCURRENCY = 16
static

The default thread concurrency level.