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::PendingActionRequest Class Reference

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

#include <PendingActionRequest.h>

Inheritance diagram for ipsdk::core::PendingActionRequest:
ipsdk::core::BaseActionRequest

Public Member Functions

eActionRequestType getActionRequestType () const
 retrieve action request type
 
BoolResult init (const ActionPtr &pAction, const Guid &socketGuid, const Guid &providerGuid, const Guid &requestGuid)
 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...
 
Constructors and destructors
 PendingActionRequest ()
 
 ~PendingActionRequest ()
 
- 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

BoolResult sendAction ()
 send action associated to pending action request to remote host More...
 
ExecResult executeActionDerived ()
 launch execution of associated action in derived class More...
 
void updateAction (BaseIArchive &ar)
 method used by UpdatePendingAction to notify associated to pending request More...
 
BoolResult notifyActionUpdated ()
 method used by UpdatePendingAction to notify that pending action has been updated More...
 
void requestCancellationDerived ()
 ask for cancellation of associated action in derived class
 
void clearDerived ()
 clear of object data in derived class
 
void connectionLostCB (const tcpip::SocketDesc &socketDesc, const boost::system::error_code &ec)
 callback used for socket connection lost notification
 
void deliveryCB (const Guid &socketGuid, ipUInt64 nDeliveryId, bool bSuccess)
 callback used for action delivery 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

ActionPtr _pAction
 pointer to action associated to request
 
Guid _socketGuid
 socket guid associated to remote request
 
Guid _providerGuid
 provider guid associated to remote request
 
Guid _socketCBGuid
 guid of socket deconnection callback
 
boost::mutex _derivedMutex
 mutex used to wait for send acquittal
 

Friends

class UpdatePendingAction
 
class AskForRemoteAction
 

Detailed Description

Class used for pending action request encapsulation.

Author
E. Noirfalise
Date
2013/12/20

These actions are send to distant machine and must be updated once execution terminated on distant machine

Member Function Documentation

◆ init()

BoolResult ipsdk::core::PendingActionRequest::init ( const ActionPtr pAction,
const Guid socketGuid,
const Guid providerGuid,
const Guid requestGuid 
)

initialization of object

Exceptions
ipsdk::core::IPSDKCoreExceptionif pAction.get() == 0
ipsdk::core::IPSDKCoreExceptionif pAction->isInit() == false
ipsdk::core::IPSDKCoreExceptionif pAction->getStatus() != eActionStatus::eAS_NotStarted
Returns
false in case of failure

◆ getSocketGuid()

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

retrieve socket guid associated to remote request

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

◆ getProviderGuid()

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

retrieve provider guid associated to remote request

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

◆ sendAction()

BoolResult ipsdk::core::PendingActionRequest::sendAction ( )
protected

send action associated to pending action request to remote host

Note
return false in case of failure

◆ executeActionDerived()

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

launch execution of associated action in derived class

Returns
execution result

Implements ipsdk::core::BaseActionRequest.

◆ updateAction()

void ipsdk::core::PendingActionRequest::updateAction ( BaseIArchive ar)
protected

method used by UpdatePendingAction to notify associated to pending request

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

◆ notifyActionUpdated()

BoolResult ipsdk::core::PendingActionRequest::notifyActionUpdated ( )
protected

method used by UpdatePendingAction to notify that pending action has been updated

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

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