Ice 3.7 C++98 API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
Glacier2::SessionFactoryHelper Class Reference

Facilitates the creation of new Glacier2 sessions. More...

#include <Glacier2/Glacier2.h>

Inheritance diagram for Glacier2::SessionFactoryHelper:
Inheritance graph
[legend]
Collaboration diagram for Glacier2::SessionFactoryHelper:
Collaboration graph
[legend]

Public Member Functions

SessionHelperPtr connect ()
 Initializes a communicator, creates a Glacier2 session using SSL credentials, and returns a new SessionHelper object. More...
 
SessionHelperPtr connect (const std::string &username, const std::string &password)
 Initializes a communicator, creates a Glacier2 session using the given username and password, and returns a new SessionHelper object. More...
 
void destroy ()
 Blocks until all background threads are terminated. More...
 
Ice::InitializationData getInitializationData () const
 Returns a copy of the InitializationData object that will be used during communicator initialization. More...
 
int getPort () const
 Obtains the port on which the Glacier2 router is listening. More...
 
std::string getProtocol () const
 Obtains the Ice protocol used for communications with the Glacier2 router. More...
 
std::string getRouterHost () const
 Obtains the host name of the Glacier2 router. More...
 
Ice::Identity getRouterIdentity () const
 Obtains the object identity of the Glacier2 router. More...
 
int getTimeout () const
 Obtains the timeout in milliseconds for the connection to the Glacier2 router. More...
 
bool getUseCallbacks () const
 Determines whether the session helper automatically creates an object adapter for callback servants. More...
 
 SessionFactoryHelper (const Ice::InitializationData &initData, const SessionCallbackPtr &callback)
 Use this constructor when you want to provide your own instance of InitializationData. More...
 
 SessionFactoryHelper (const Ice::PropertiesPtr &properties, const SessionCallbackPtr &callback)
 This constructor is convenient when you want to supply an initial set of properties. More...
 
 SessionFactoryHelper (const SessionCallbackPtr &callback)
 This constructor is useful when your application has no other configuration requirements. More...
 
void setConnectContext (const std::map< std::string, std::string > &context)
 Sets the request context to be used when creating a session. More...
 
void setPort (int port)
 Sets the port on which the Glacier2 router is listening. More...
 
void setProtocol (const std::string &protocol)
 Sets the Ice protocol used for communications with the Glacier2 router. More...
 
void setRouterHost (const std::string &host)
 Sets the host name of the Glacier2 router. More...
 
void setRouterIdentity (const Ice::Identity &identity)
 Sets the object identity of the Glacier2 router. More...
 
void setTimeout (int timeout)
 Sets the timeout in milliseconds for the connection to the Glacier2 router. More...
 
void setUseCallbacks (bool b)
 Determines whether the session helper automatically creates an object adapter for callback servants. More...
 
 ~SessionFactoryHelper ()
 
- Public Member Functions inherited from IceUtil::Shared
void __clearFlag (unsigned char flag)
 
virtual void __decRef ()
 
virtual int __getRef () const
 
bool __hasFlag (unsigned char flag)
 
virtual void __incRef ()
 
void __setFlag (unsigned char flag)
 
virtual void __setNoDelete (bool)
 
Sharedoperator= (const Shared &)
 
 Shared ()
 
 Shared (const Shared &)
 
virtual ~Shared ()
 

Additional Inherited Members

- Static Public Attributes inherited from IceUtil::Shared
static const unsigned char NoDelete
 
- Protected Attributes inherited from IceUtil::Shared
unsigned char _flags
 
IceUtilInternal::Atomic _ref
 

Detailed Description

Facilitates the creation of new Glacier2 sessions.

Constructor & Destructor Documentation

◆ SessionFactoryHelper() [1/3]

Glacier2::SessionFactoryHelper::SessionFactoryHelper ( const SessionCallbackPtr callback)

This constructor is useful when your application has no other configuration requirements.

The constructor allocates an InitializationData object and a new property set.

Parameters
callbackThe callback object (must not be nil).

◆ SessionFactoryHelper() [2/3]

Glacier2::SessionFactoryHelper::SessionFactoryHelper ( const Ice::InitializationData initData,
const SessionCallbackPtr callback 
)

Use this constructor when you want to provide your own instance of InitializationData.

Parameters
initDataInitialization data for the communicator.
callbackThe callback object (must not be nil).

◆ SessionFactoryHelper() [3/3]

Glacier2::SessionFactoryHelper::SessionFactoryHelper ( const Ice::PropertiesPtr properties,
const SessionCallbackPtr callback 
)

This constructor is convenient when you want to supply an initial set of properties.

Parameters
propertiesConfiguration properties for the communicator.
callbackThe callback object (must not be nil).

◆ ~SessionFactoryHelper()

Glacier2::SessionFactoryHelper::~SessionFactoryHelper ( )

Member Function Documentation

◆ connect() [1/2]

SessionHelperPtr Glacier2::SessionFactoryHelper::connect ( )

Initializes a communicator, creates a Glacier2 session using SSL credentials, and returns a new SessionHelper object.

◆ connect() [2/2]

SessionHelperPtr Glacier2::SessionFactoryHelper::connect ( const std::string &  username,
const std::string &  password 
)

Initializes a communicator, creates a Glacier2 session using the given username and password, and returns a new SessionHelper object.

◆ destroy()

void Glacier2::SessionFactoryHelper::destroy ( )

Blocks until all background threads are terminated.

◆ getInitializationData()

Ice::InitializationData Glacier2::SessionFactoryHelper::getInitializationData ( ) const

Returns a copy of the InitializationData object that will be used during communicator initialization.

Returns
The communicator initialization data.

◆ getPort()

int Glacier2::SessionFactoryHelper::getPort ( ) const

Obtains the port on which the Glacier2 router is listening.

Returns
The router port.

◆ getProtocol()

std::string Glacier2::SessionFactoryHelper::getProtocol ( ) const

Obtains the Ice protocol used for communications with the Glacier2 router.

Returns
The protocol name.

◆ getRouterHost()

std::string Glacier2::SessionFactoryHelper::getRouterHost ( ) const

Obtains the host name of the Glacier2 router.

Returns
The router host name.

◆ getRouterIdentity()

Ice::Identity Glacier2::SessionFactoryHelper::getRouterIdentity ( ) const

Obtains the object identity of the Glacier2 router.

Returns
The router identity.

◆ getTimeout()

int Glacier2::SessionFactoryHelper::getTimeout ( ) const

Obtains the timeout in milliseconds for the connection to the Glacier2 router.

Returns
The timeout in milliseconds.

◆ getUseCallbacks()

bool Glacier2::SessionFactoryHelper::getUseCallbacks ( ) const

Determines whether the session helper automatically creates an object adapter for callback servants.

Returns
True if the helper will create an object adapter, false otherwise.

◆ setConnectContext()

void Glacier2::SessionFactoryHelper::setConnectContext ( const std::map< std::string, std::string > &  context)

Sets the request context to be used when creating a session.

Parameters
contextThe request context.

◆ setPort()

void Glacier2::SessionFactoryHelper::setPort ( int  port)

Sets the port on which the Glacier2 router is listening.

Parameters
portThe router port.

◆ setProtocol()

void Glacier2::SessionFactoryHelper::setProtocol ( const std::string &  protocol)

Sets the Ice protocol used for communications with the Glacier2 router.

Parameters
protocolThe protocol name (e.g., "tcp").

◆ setRouterHost()

void Glacier2::SessionFactoryHelper::setRouterHost ( const std::string &  host)

Sets the host name of the Glacier2 router.

Parameters
hostThe router host name.

◆ setRouterIdentity()

void Glacier2::SessionFactoryHelper::setRouterIdentity ( const Ice::Identity identity)

Sets the object identity of the Glacier2 router.

Parameters
identityThe router identity.

◆ setTimeout()

void Glacier2::SessionFactoryHelper::setTimeout ( int  timeout)

Sets the timeout in milliseconds for the connection to the Glacier2 router.

Parameters
timeoutThe timeout in milliseconds.

◆ setUseCallbacks()

void Glacier2::SessionFactoryHelper::setUseCallbacks ( bool  b)

Determines whether the session helper automatically creates an object adapter for callback servants.

Parameters
bTrue if the helper should create an object adapter, false otherwise.

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