PHP Class Thruway\Subscription\Subscription

Inheritance: use trait Thruway\Message\Traits\OptionsTrait
Exibir arquivo Open project: voryx/thruway Class Usage Examples

Public Methods

Method Description
__construct ( string $uri, Session $session, mixed $options = null ) Constructor
createSubscriptionFromSubscribeMessage ( Session $session, Thruway\Message\SubscribeMessage $msg ) : Subscription Create Subscription from SubscribeMessage
getId ( ) : mixed Get subscription ID
getSession ( ) : Session Get session
getSubscriptionGroup ( ) : SubscriptionGroup
getUri ( ) : string Get URI
isDisclosePublisher ( ) : boolean
isPausedForState ( ) : boolean
pauseForState ( ) Pauses all non-state building event messages
sendEventMessage ( Thruway\Message\EventMessage $msg )
setDisclosePublisher ( boolean $disclosePublisher )
setSession ( Session $session ) Set session
setSubscriptionGroup ( SubscriptionGroup $subscriptionGroup )
setUri ( string $uri ) Set URI
unPauseForState ( $lastPublicationId = null )

Private Methods

Method Description
processStateQueue ( null $lastPublicationId = null )

Method Details

__construct() public method

Constructor
public __construct ( string $uri, Session $session, mixed $options = null )
$uri string
$session Thruway\Session
$options mixed

createSubscriptionFromSubscribeMessage() public static method

Create Subscription from SubscribeMessage
public static createSubscriptionFromSubscribeMessage ( Session $session, Thruway\Message\SubscribeMessage $msg ) : Subscription
$session Thruway\Session
$msg Thruway\Message\SubscribeMessage
return Subscription

getId() public method

Get subscription ID
public getId ( ) : mixed
return mixed

getSession() public method

Get session
public getSession ( ) : Session
return Thruway\Session

getSubscriptionGroup() public method

public getSubscriptionGroup ( ) : SubscriptionGroup
return SubscriptionGroup

getUri() public method

Get URI
public getUri ( ) : string
return string

isDisclosePublisher() public method

public isDisclosePublisher ( ) : boolean
return boolean

isPausedForState() public method

public isPausedForState ( ) : boolean
return boolean

pauseForState() public method

Pauses all non-state building event messages
public pauseForState ( )

sendEventMessage() public method

public sendEventMessage ( Thruway\Message\EventMessage $msg )
$msg Thruway\Message\EventMessage

setDisclosePublisher() public method

public setDisclosePublisher ( boolean $disclosePublisher )
$disclosePublisher boolean

setSession() public method

Set session
public setSession ( Session $session )
$session Thruway\Session

setSubscriptionGroup() public method

public setSubscriptionGroup ( SubscriptionGroup $subscriptionGroup )
$subscriptionGroup SubscriptionGroup

setUri() public method

Set URI
public setUri ( string $uri )
$uri string

unPauseForState() public method

public unPauseForState ( $lastPublicationId = null )
$lastPublicationId