PHP Class Thruway\Subscription\StateHandlerRegistry

Inheritance: extends Thruway\Module\RouterModuleClient
Afficher le fichier Open project: voryx/thruway

Méthodes publiques

Méthode Description
__construct ( string $realm, React\EventLoop\LoopInterface $loop = null )
addStateHandler ( $args )
getReady ( ) : boolean Get ready flag
initModule ( Thruway\Peer\RouterInterface $router, React\EventLoop\LoopInterface $loop ) Gets called when the module is initialized in the router
onSessionStart ( ClientSession $session, Thruway\Transport\TransportProviderInterface $transport ) Handles session started
processSubscriptionAdded ( Subscription $subscription )
processSubscriptionRemoved ( Subscription $subscription )
removeStateHandler ( $args )
setReady ( boolean $ready ) Set ready flag

Private Methods

Méthode Description
getStateHandlerRegistrationForSubscription ( Subscription $subscription ) : StateHandlerRegistration | boolean | null
mapNewStateHandlerRegistration ( StateHandlerRegistration $stateHandlerRegistration )
setupStateHandlerRegistration ( SubscriptionGroup $subscriptionGroup ) Called when we need to setup a registration If there is a registration that works - then we set the handler Otherwise, we set it to null

Method Details

__construct() public méthode

public __construct ( string $realm, React\EventLoop\LoopInterface $loop = null )
$realm string
$loop React\EventLoop\LoopInterface

addStateHandler() public méthode

public addStateHandler ( $args )
$args

getReady() public méthode

Get ready flag
public getReady ( ) : boolean
Résultat boolean

initModule() public méthode

Gets called when the module is initialized in the router
public initModule ( Thruway\Peer\RouterInterface $router, React\EventLoop\LoopInterface $loop )
$router Thruway\Peer\RouterInterface
$loop React\EventLoop\LoopInterface

onSessionStart() public méthode

Handles session started
public onSessionStart ( ClientSession $session, Thruway\Transport\TransportProviderInterface $transport )
$session Thruway\ClientSession
$transport Thruway\Transport\TransportProviderInterface

processSubscriptionAdded() public méthode

public processSubscriptionAdded ( Subscription $subscription )
$subscription Subscription

processSubscriptionRemoved() public méthode

public processSubscriptionRemoved ( Subscription $subscription )
$subscription Subscription

removeStateHandler() public méthode

public removeStateHandler ( $args )
$args

setReady() public méthode

Set ready flag
public setReady ( boolean $ready )
$ready boolean