Public Member Functions | Protected Member Functions | Protected Attributes

zeus::TAbstractStub Class Reference

#include <AbstractStub.h>

Inheritance diagram for zeus::TAbstractStub:
zeus::TZObject zeus::IRemoteObjectStub zeus::IZUnknown zeus::IRemoteObject zeus::IZUnknown zeus::TCommPipe_Stub zeus::TMessagePool_Stub zeus::TMessageServerConnection_Stub zeus::TNamedContext_Stub

List of all members.

Public Member Functions

 TAbstractStub (bool bHighPerformance=false)
virtual void MQUALIFIER setClassName (const IString &rName)
virtual void MQUALIFIER setCodeModuleName (const IString &rName)
virtual Retval MQUALIFIER connect (const IString &rAddress, Uint uiPort)
virtual void MQUALIFIER getClassName (IString &rName) const
virtual void MQUALIFIER getCodeModuleName (IString &rName) const
virtual Retval MQUALIFIER getConnectionParam (IString &rAddress, Uint &uiPort) const
virtual Retval MQUALIFIER askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface)
virtual void MQUALIFIER addRef () const
virtual void MQUALIFIER release () const

Protected Member Functions

virtual ~TAbstractStub ()
Retval sendMethod (TRemoteMethodCall &rMethod, IRemoteMethodCall *&rpMethodreturn) const
Retval getMethodReturn (IRemoteMethodCall *&rpMethodreturn) const
void disconnect ()

Protected Attributes

TSocketm_pSocket
 Socket class.
TString m_strCodeModule
 Name of the codeModule.
TString m_strClassName
 name of the class
TString m_strAddress
 IP address.
Uint m_uiPort
 TCP port.

Detailed Description

This class implements an abstract sub for connecting, sending method calls and receiving return values from the methods


Constructor & Destructor Documentation

TAbstractStub::TAbstractStub ( bool  bHighPerformance = false )

Creates an abstract stub object

Parameters:
bHighPerformance: flag for high performance data communication. false is default.
TAbstractStub::~TAbstractStub (  ) [protected, virtual]

Destroys the stub


Member Function Documentation

virtual void MQUALIFIER zeus::TAbstractStub::addRef (  ) const [virtual]
virtual Retval MQUALIFIER zeus::TAbstractStub::askForInterface ( const InterfaceID rInterfaceID,
IZUnknown *&  rpIface 
) [virtual]
Retval MQUALIFIER TAbstractStub::connect ( const IString rAddress,
Uint  uiPort 
) [virtual]
void TAbstractStub::disconnect (  ) [protected]

Disconnects from the remote object

void MQUALIFIER zeus::TAbstractStub::getClassName ( IString rName ) const [inline, virtual]
void MQUALIFIER zeus::TAbstractStub::getCodeModuleName ( IString rName ) const [inline, virtual]
Retval MQUALIFIER zeus::TAbstractStub::getConnectionParam ( IString rAddress,
Uint &  uiPort 
) const [inline, virtual]
Retval TAbstractStub::getMethodReturn ( IRemoteMethodCall *&  rpMethodreturn ) const [protected]

this method trys to receive the return values of the method

Parameters:
rpMethodreturn: Return values of the remote method call. If this parameter is NULL, this method checks only the CCTP return value
Returns:
Error codes (see sendMethod())
Precondition:
The parameter methodreturn and the member m_pSocket must be valid
virtual void MQUALIFIER zeus::TAbstractStub::release (  ) const [virtual]
Retval TAbstractStub::sendMethod ( TRemoteMethodCall rMethod,
IRemoteMethodCall *&  rMethodreturn 
) const [protected]

This method sends a remote method call to a remote object and waits until the response will arrive. The response will be returned by the 2nd argument and must be released if the method returns RET_NOERROR

Parameters:
rMethod: Method object to send
rMethodreturn: Method object containing the return values. If no return value must be received, this parameter must be NULL.
Return values:
RET_NOERROR: Method has been returned
RET_NETWORK_ERROR: Error using the network layer
RET_SERIALIZE_FAILED: Could not serialize the object
RET_REMOTECALL_ERROR: CCTP Protocol returned error or unable to create the returned object.
RET_REMOTEPROTOCOL_ERROR: Transport protocol returns an error
Precondition:
The method parameter must be valid.
void MQUALIFIER zeus::TAbstractStub::setClassName ( const IString rName ) [inline, virtual]
void MQUALIFIER zeus::TAbstractStub::setCodeModuleName ( const IString rName ) [inline, virtual]

Member Data Documentation

Socket class.

IP address.

name of the class

Name of the codeModule.

TCP port.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:30