PHP Класс Thruway\Subscription\StateHandlerRegistry

Наследование: extends Thruway\Module\RouterModuleClient
Показать файл Открыть проект

Открытые методы

Метод Описание
__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

Приватные методы

Метод Описание
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

Описание методов

__construct() публичный Метод

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

addStateHandler() публичный Метод

public addStateHandler ( $args )
$args

getReady() публичный Метод

Get ready flag
public getReady ( ) : boolean
Результат boolean

initModule() публичный Метод

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() публичный Метод

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

processSubscriptionAdded() публичный Метод

public processSubscriptionAdded ( Subscription $subscription )
$subscription Subscription

processSubscriptionRemoved() публичный Метод

public processSubscriptionRemoved ( Subscription $subscription )
$subscription Subscription

removeStateHandler() публичный Метод

public removeStateHandler ( $args )
$args

setReady() публичный Метод

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