IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ipsdk::core::RemoteActionRequest Class Reference

Class used for remote action request encapsulation. More...

#include <RemoteActionRequest.h>

Inheritance diagram for ipsdk::core::RemoteActionRequest:
ipsdk::core::BaseActionRequest

Public Member Functions

eActionRequestType getActionRequestType () const
 retrieve action request type
 
BoolResult init (const Guid &socketGuid, const Guid &providerGuid)
 initialization of object More...
 
const GuidgetSocketGuid () const
 retrieve socket guid associated to remote request More...
 
const GuidgetProviderGuid () const
 retrieve provider guid associated to remote request More...
 
bool isNoMoreActionDetected () const
 
Constructors and destructors
 RemoteActionRequest ()
 
 ~RemoteActionRequest ()
 
- Public Member Functions inherited from ipsdk::core::BaseActionRequest
bool isInit () const
 retrieve object initialization flag
 
const GuidgetGuid () const
 retrieve guid associated to action request More...
 
eExecutionStatus getStatus () const
 check for request execution status More...
 
void addCompletionCB (const RequestCompletionCB &completionCB)
 add a completion callback associated to action request More...
 
ExecResult executeAction ()
 launch execution of associated action More...
 
void requestCancellation ()
 ask for cancellation of associated action More...
 
bool isCancellationRequested () const
 check whether a cancellation has been requested More...
 
void waitForCompletion ()
 method allowing to wait for execution end More...
 
ExecResult getActionResult () const
 retrieve action result More...
 
void clear ()
 clear of object data More...
 
 BaseActionRequest ()
 
virtual ~BaseActionRequest ()=0
 

Protected Member Functions

ExecResult executeActionDerived ()
 launch execution of associated action in derived class More...
 
void updateAction (const ActionPtr &pAction)
 method used by UpdateRemoteAction to update action associated to request More...
 
void updateActionFailure (const std::string &msg)
 method used by UpdateRemoteAction to notify a failure on action update More...
 
void updateActionNoMore ()
 method used by UpdateRemoteAction to notify that no more action are available for execution More...
 
void requestCancellationDerived ()
 ask for cancellation of associated action in derived class
 
void clearDerived ()
 clear of object data in derived class
 
void notifyActionCompletion (const ActionPtr &pAction)
 method used to notify of execution completion for action
 
void deliveryCB (const Guid &socketGuid, ipUInt64 nDeliveryId, bool bSuccess)
 callback used for action delivery notification
 
void connectionLostCB (const tcpip::SocketDesc &socketDesc, const boost::system::error_code &ec)
 callback used for socket connection lost notification
 
- Protected Member Functions inherited from ipsdk::core::BaseActionRequest
BoolResult initBase (const Guid &requestGuid=Guid())
 base class initialization method More...
 
void setStatusToWaiting ()
 method allowing to set request status to waiting for execution More...
 
void notifyCompletion (const ExecResult &bResult)
 method used to notify of execution completion for request More...
 

Protected Attributes

Guid _socketGuid
 socket guid associated to remote request
 
Guid _providerGuid
 provider guid associated to remote request
 
Guid _socketCBGuid
 guid of socket deconnection callback
 
ActionPtr _pAction
 action associated to object
 
boost::mutex _derivedMutex
 mutex used for concurrent accesses protection
 
boost::condition_variable _derivedCondition
 condition variable used to woke up waiting thread
 
bool _bNoMoreActionDetected
 flag indicating whether a no more action case has been detected
 

Friends

class UpdateRemoteAction
 

Detailed Description

Class used for remote action request encapsulation.

Author
E. Noirfalise
Date
2013/12/18

Access to these actions is delayed

Member Function Documentation

◆ init()

BoolResult ipsdk::core::RemoteActionRequest::init ( const Guid socketGuid,
const Guid providerGuid 
)

initialization of object

Returns
false in case of failure

◆ getSocketGuid()

const Guid& ipsdk::core::RemoteActionRequest::getSocketGuid ( ) const

retrieve socket guid associated to remote request

Exceptions
ipsdk::core::IPSDKCoreExceptionif isInit() == false

◆ getProviderGuid()

const Guid& ipsdk::core::RemoteActionRequest::getProviderGuid ( ) const

retrieve provider guid associated to remote request

Exceptions
ipsdk::core::IPSDKCoreExceptionif isInit() == false

◆ isNoMoreActionDetected()

bool ipsdk::core::RemoteActionRequest::isNoMoreActionDetected ( ) const

check whether a no more action case has been detected

Exceptions
ipsdk::core::IPSDKCoreExceptionif isInit() == false

◆ executeActionDerived()

ExecResult ipsdk::core::RemoteActionRequest::executeActionDerived ( )
protectedvirtual

launch execution of associated action in derived class

Returns
execution result

Implements ipsdk::core::BaseActionRequest.

◆ updateAction()

void ipsdk::core::RemoteActionRequest::updateAction ( const ActionPtr pAction)
protected

method used by UpdateRemoteAction to update action associated to request

Exceptions
ipsdk::core::IPSDKCoreExceptionif getStatus() != eExecutionStatus::eES_Running
ipsdk::core::IPSDKCoreExceptionif pAction->getStatus() != eExecutionStatus::eES_NotStarted

◆ updateActionFailure()

void ipsdk::core::RemoteActionRequest::updateActionFailure ( const std::string &  msg)
protected

method used by UpdateRemoteAction to notify a failure on action update

Exceptions
ipsdk::core::IPSDKCoreExceptionif getStatus() != eExecutionStatus::eES_Running

◆ updateActionNoMore()

void ipsdk::core::RemoteActionRequest::updateActionNoMore ( )
protected

method used by UpdateRemoteAction to notify that no more action are available for execution

Exceptions
ipsdk::core::IPSDKCoreExceptionif getStatus() != eExecutionStatus::eES_Running

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