Ice 3.7 C++11 API Reference
Public Types | Public Member Functions | Static Public Member Functions | List of all members
IceGrid::AdminSession Class Referenceabstract

Used by administrative clients to view, update, and receive observer updates from the IceGrid registry. More...

#include <IceGrid/IceGrid.h>

Inheritance diagram for IceGrid::AdminSession:
Inheritance graph
[legend]
Collaboration diagram for IceGrid::AdminSession:
Collaboration graph
[legend]

Public Types

using ProxyType = AdminSessionPrx
 
- Public Types inherited from Glacier2::Session
using ProxyType = SessionPrx
 

Public Member Functions

virtual void finishUpdate (const ::Ice::Current &current)=0
 Finish updating the registry and release the exclusive lock. More...
 
virtual ::std::shared_ptr< AdminPrxgetAdmin (const ::Ice::Current &current) const =0
 Get the admin interface. More...
 
virtual ::std::shared_ptr<::Ice::ObjectPrxgetAdminCallbackTemplate (const ::Ice::Current &current) const =0
 Get a "template" proxy for admin callback objects. More...
 
virtual ::std::string getReplicaName (const ::Ice::Current &current) const =0
 Get the name of the registry replica hosting this session. More...
 
virtual ::std::string ice_id (const ::Ice::Current &current) const override
 Obtains a Slice type ID representing the most-derived interface supported by this object. More...
 
virtual ::std::vector<::std::string > ice_ids (const ::Ice::Current &current) const override
 Obtains a list of the Slice type IDs representing the interfaces supported by this object. More...
 
virtual bool ice_isA (::std::string id, const ::Ice::Current &current) const override
 Determines whether this object supports an interface with the given Slice type ID. More...
 
virtual void keepAlive (const ::Ice::Current &current)=0
 Keep the session alive. More...
 
virtual ::std::shared_ptr< FileIteratorPrxopenNodeStdErr (::std::string name, int count, const ::Ice::Current &current)=0
 Open the given node stderr file for reading. More...
 
virtual ::std::shared_ptr< FileIteratorPrxopenNodeStdOut (::std::string name, int count, const ::Ice::Current &current)=0
 Open the given node stdout file for reading. More...
 
virtual ::std::shared_ptr< FileIteratorPrxopenRegistryStdErr (::std::string name, int count, const ::Ice::Current &current)=0
 Open the given registry stderr file for reading. More...
 
virtual ::std::shared_ptr< FileIteratorPrxopenRegistryStdOut (::std::string name, int count, const ::Ice::Current &current)=0
 Open the given registry stdout file for reading. More...
 
virtual ::std::shared_ptr< FileIteratorPrxopenServerLog (::std::string id, ::std::string path, int count, const ::Ice::Current &current)=0
 Open the given server log file for reading. More...
 
virtual ::std::shared_ptr< FileIteratorPrxopenServerStdErr (::std::string id, int count, const ::Ice::Current &current)=0
 Open the given server stderr file for reading. More...
 
virtual ::std::shared_ptr< FileIteratorPrxopenServerStdOut (::std::string id, int count, const ::Ice::Current &current)=0
 Open the given server stdout file for reading. More...
 
virtual void setObservers (::std::shared_ptr< RegistryObserverPrx > registryObs, ::std::shared_ptr< NodeObserverPrx > nodeObs, ::std::shared_ptr< ApplicationObserverPrx > appObs, ::std::shared_ptr< AdapterObserverPrx > adptObs, ::std::shared_ptr< ObjectObserverPrx > objObs, const ::Ice::Current &current)=0
 Set the observer proxies that receive notifications when the state of the registry or nodes changes. More...
 
virtual void setObserversByIdentity (::Ice::Identity registryObs, ::Ice::Identity nodeObs, ::Ice::Identity appObs, ::Ice::Identity adptObs, ::Ice::Identity objObs, const ::Ice::Current &current)=0
 Set the observer identities that receive notifications the state of the registry or nodes changes. More...
 
virtual int startUpdate (const ::Ice::Current &current)=0
 Acquires an exclusive lock to start updating the registry applications. More...
 
- Public Member Functions inherited from Glacier2::Session
virtual void destroy (const ::Ice::Current &current)=0
 Destroy the session. More...
 
virtual ::std::string ice_id (const ::Ice::Current &current) const override
 Obtains a Slice type ID representing the most-derived interface supported by this object. More...
 
virtual ::std::vector<::std::string > ice_ids (const ::Ice::Current &current) const override
 Obtains a list of the Slice type IDs representing the interfaces supported by this object. More...
 
- Public Member Functions inherited from Ice::Object
virtual bool ice_dispatch (Ice::Request &request, std::function< bool()> response=nullptr, std::function< bool(std::exception_ptr)> error=nullptr)
 Dispatches an invocation to a servant. More...
 
virtual std::string ice_id (const Current &current) const
 Returns the Slice type ID of the most-derived interface supported by this object. More...
 
virtual std::vector< std::string > ice_ids (const Current &current) const
 Returns the Slice type IDs of the interfaces supported by this object. More...
 
virtual bool ice_isA (std::string s, const Current &current) const
 Tests whether this object supports a specific Slice interface. More...
 
virtual void ice_ping (const Current &current) const
 Tests whether this object can be reached. More...
 
virtual ~Object ()=default
 

Static Public Member Functions

static const ::std::string & ice_staticId ()
 Obtains the Slice type ID corresponding to this class. More...
 
- Static Public Member Functions inherited from Glacier2::Session
static const ::std::string & ice_staticId ()
 Obtains the Slice type ID corresponding to this class. More...
 
- Static Public Member Functions inherited from Ice::Object
static const std::string & ice_staticId ()
 Obtains the Slice type ID of this type. More...
 

Detailed Description

Used by administrative clients to view, update, and receive observer updates from the IceGrid registry.

Admin sessions are created either via the Registry object or via the registry admin SessionManager object.

See also
Registry

Member Typedef Documentation

◆ ProxyType

Member Function Documentation

◆ finishUpdate()

virtual void IceGrid::AdminSession::finishUpdate ( const ::Ice::Current current)
pure virtual

Finish updating the registry and release the exclusive lock.

Parameters
currentThe Current object for the invocation.
Exceptions
IceGrid::AccessDeniedExceptionRaised if the session doesn't hold the exclusive lock.

◆ getAdmin()

virtual ::std::shared_ptr<AdminPrx> IceGrid::AdminSession::getAdmin ( const ::Ice::Current current) const
pure virtual

Get the admin interface.

The admin object returned by this operation can only be accessed by the session.

Parameters
currentThe Current object for the invocation.
Returns
The admin interface proxy.

◆ getAdminCallbackTemplate()

virtual ::std::shared_ptr<::Ice::ObjectPrx> IceGrid::AdminSession::getAdminCallbackTemplate ( const ::Ice::Current current) const
pure virtual

Get a "template" proxy for admin callback objects.

An Admin client uses this proxy to set the category of its callback objects, and the published endpoints of the object adapter hosting the admin callback objects.

Parameters
currentThe Current object for the invocation.
Returns
A template proxy. The returned proxy is null when the Admin session was established using Glacier2.

◆ getReplicaName()

virtual ::std::string IceGrid::AdminSession::getReplicaName ( const ::Ice::Current current) const
pure virtual

Get the name of the registry replica hosting this session.

Parameters
currentThe Current object for the invocation.
Returns
The replica name of the registry.

◆ ice_id()

virtual ::std::string IceGrid::AdminSession::ice_id ( const ::Ice::Current current) const
override

Obtains a Slice type ID representing the most-derived interface supported by this object.

Parameters
currentThe Current object for the invocation.
Returns
A fully-scoped type ID.

◆ ice_ids()

virtual ::std::vector<::std::string> IceGrid::AdminSession::ice_ids ( const ::Ice::Current current) const
override

Obtains a list of the Slice type IDs representing the interfaces supported by this object.

Parameters
currentThe Current object for the invocation.
Returns
A list of fully-scoped type IDs.

◆ ice_isA()

virtual bool IceGrid::AdminSession::ice_isA ( ::std::string  id,
const ::Ice::Current current 
) const
overridevirtual

Determines whether this object supports an interface with the given Slice type ID.

Parameters
idThe fully-scoped Slice type ID.
currentThe Current object for the invocation.
Returns
True if this object supports the interface, false, otherwise.

Reimplemented from Glacier2::Session.

◆ ice_staticId()

static const ::std::string& IceGrid::AdminSession::ice_staticId ( )
static

Obtains the Slice type ID corresponding to this class.

Returns
A fully-scoped type ID.

◆ keepAlive()

virtual void IceGrid::AdminSession::keepAlive ( const ::Ice::Current current)
pure virtual

Keep the session alive.

Clients should call this operation regularly to prevent the server from reaping the session.

Parameters
currentThe Current object for the invocation.
See also
Registry::getSessionTimeout

◆ openNodeStdErr()

virtual ::std::shared_ptr<FileIteratorPrx> IceGrid::AdminSession::openNodeStdErr ( ::std::string  name,
int  count,
const ::Ice::Current current 
)
pure virtual

Open the given node stderr file for reading.

The file can be read with the returned file iterator.

Parameters
nameThe node name.
countSpecifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the last count lines.
currentThe Current object for the invocation.
Returns
An iterator to read the file.
Exceptions
IceGrid::FileNotAvailableExceptionRaised if the file can't be read.
IceGrid::NodeNotExistExceptionRaised if the node doesn't exist.
IceGrid::NodeUnreachableExceptionRaised if the node could not be reached.

◆ openNodeStdOut()

virtual ::std::shared_ptr<FileIteratorPrx> IceGrid::AdminSession::openNodeStdOut ( ::std::string  name,
int  count,
const ::Ice::Current current 
)
pure virtual

Open the given node stdout file for reading.

The file can be read with the returned file iterator.

Parameters
nameThe node name.
countSpecifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the last count lines.
currentThe Current object for the invocation.
Returns
An iterator to read the file.
Exceptions
IceGrid::FileNotAvailableExceptionRaised if the file can't be read.
IceGrid::NodeNotExistExceptionRaised if the node doesn't exist.
IceGrid::NodeUnreachableExceptionRaised if the node could not be reached.

◆ openRegistryStdErr()

virtual ::std::shared_ptr<FileIteratorPrx> IceGrid::AdminSession::openRegistryStdErr ( ::std::string  name,
int  count,
const ::Ice::Current current 
)
pure virtual

Open the given registry stderr file for reading.

The file can be read with the returned file iterator.

Parameters
nameThe registry name.
countSpecifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the last count lines.
currentThe Current object for the invocation.
Returns
An iterator to read the file.
Exceptions
IceGrid::FileNotAvailableExceptionRaised if the file can't be read.
IceGrid::RegistryNotExistExceptionRaised if the registry doesn't exist.
IceGrid::RegistryUnreachableExceptionRaised if the registry could not be reached.

◆ openRegistryStdOut()

virtual ::std::shared_ptr<FileIteratorPrx> IceGrid::AdminSession::openRegistryStdOut ( ::std::string  name,
int  count,
const ::Ice::Current current 
)
pure virtual

Open the given registry stdout file for reading.

The file can be read with the returned file iterator.

Parameters
nameThe registry name.
countSpecifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the last count lines.
currentThe Current object for the invocation.
Returns
An iterator to read the file.
Exceptions
IceGrid::FileNotAvailableExceptionRaised if the file can't be read.
IceGrid::RegistryNotExistExceptionRaised if the registry doesn't exist.
IceGrid::RegistryUnreachableExceptionRaised if the registry could not be reached.

◆ openServerLog()

virtual ::std::shared_ptr<FileIteratorPrx> IceGrid::AdminSession::openServerLog ( ::std::string  id,
::std::string  path,
int  count,
const ::Ice::Current current 
)
pure virtual

Open the given server log file for reading.

The file can be read with the returned file iterator.

Parameters
idThe server id.
pathThe path of the log file. A log file can be opened only if it's declared in the server or service deployment descriptor.
countSpecifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the last count lines.
currentThe Current object for the invocation.
Returns
An iterator to read the file.
Exceptions
IceGrid::DeploymentExceptionRaised if the server couldn't be deployed on the node.
IceGrid::FileNotAvailableExceptionRaised if the file can't be read.
IceGrid::NodeUnreachableExceptionRaised if the node could not be reached.
IceGrid::ServerNotExistExceptionRaised if the server doesn't exist.

◆ openServerStdErr()

virtual ::std::shared_ptr<FileIteratorPrx> IceGrid::AdminSession::openServerStdErr ( ::std::string  id,
int  count,
const ::Ice::Current current 
)
pure virtual

Open the given server stderr file for reading.

The file can be read with the returned file iterator.

Parameters
idThe server id.
countSpecifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the last count lines.
currentThe Current object for the invocation.
Returns
An iterator to read the file.
Exceptions
IceGrid::DeploymentExceptionRaised if the server couldn't be deployed on the node.
IceGrid::FileNotAvailableExceptionRaised if the file can't be read.
IceGrid::NodeUnreachableExceptionRaised if the node could not be reached.
IceGrid::ServerNotExistExceptionRaised if the server doesn't exist.

◆ openServerStdOut()

virtual ::std::shared_ptr<FileIteratorPrx> IceGrid::AdminSession::openServerStdOut ( ::std::string  id,
int  count,
const ::Ice::Current current 
)
pure virtual

Open the given server stdout file for reading.

The file can be read with the returned file iterator.

Parameters
idThe server id.
countSpecifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the last count lines.
currentThe Current object for the invocation.
Returns
An iterator to read the file.
Exceptions
IceGrid::DeploymentExceptionRaised if the server couldn't be deployed on the node.
IceGrid::FileNotAvailableExceptionRaised if the file can't be read.
IceGrid::NodeUnreachableExceptionRaised if the node could not be reached.
IceGrid::ServerNotExistExceptionRaised if the server doesn't exist.

◆ setObservers()

virtual void IceGrid::AdminSession::setObservers ( ::std::shared_ptr< RegistryObserverPrx registryObs,
::std::shared_ptr< NodeObserverPrx nodeObs,
::std::shared_ptr< ApplicationObserverPrx appObs,
::std::shared_ptr< AdapterObserverPrx adptObs,
::std::shared_ptr< ObjectObserverPrx objObs,
const ::Ice::Current current 
)
pure virtual

Set the observer proxies that receive notifications when the state of the registry or nodes changes.

Parameters
registryObsThe registry observer.
nodeObsThe node observer.
appObsThe application observer.
adptObsThe adapter observer.
objObsThe object observer.
currentThe Current object for the invocation.
Exceptions
IceGrid::ObserverAlreadyRegisteredExceptionRaised if an observer is already registered with this registry.

◆ setObserversByIdentity()

virtual void IceGrid::AdminSession::setObserversByIdentity ( ::Ice::Identity  registryObs,
::Ice::Identity  nodeObs,
::Ice::Identity  appObs,
::Ice::Identity  adptObs,
::Ice::Identity  objObs,
const ::Ice::Current current 
)
pure virtual

Set the observer identities that receive notifications the state of the registry or nodes changes.

This operation should be used by clients that are using a bidirectional connection to communicate with the session.

Parameters
registryObsThe registry observer identity.
nodeObsThe node observer identity.
appObsThe application observer.
adptObsThe adapter observer.
objObsThe object observer.
currentThe Current object for the invocation.
Exceptions
IceGrid::ObserverAlreadyRegisteredExceptionRaised if an observer is already registered with this registry.

◆ startUpdate()

virtual int IceGrid::AdminSession::startUpdate ( const ::Ice::Current current)
pure virtual

Acquires an exclusive lock to start updating the registry applications.

Parameters
currentThe Current object for the invocation.
Returns
The current serial.
Exceptions
IceGrid::AccessDeniedExceptionRaised if the exclusive lock can't be acquired. This might happen if the lock is currently acquired by another session.

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