메소드 |
설명 |
|
createProtocol ( string | string[] | null $message = null ) : Kraken\Channel\Protocol\ProtocolInterface |
Put message into newly created protocol and return its wrapper. |
|
filterConnected ( string | string[] $pattern ) : string[] |
Return array of all connected channels' IDs that matches pattern |
|
getConnected ( ) : string[] |
Return array of all connected external channels' IDs. |
|
getInput ( ) : Kraken\Channel\Router\RouterInterface | Kraken\Channel\Router\RouterCompositeInterface |
Return router used for input messages. |
|
getModel ( ) : Kraken\Channel\ChannelModelInterface | null |
Return model which is being used by Channel. |
|
getName ( ) : string |
Return Channel name. |
|
getOutput ( ) : Kraken\Channel\Router\RouterInterface | Kraken\Channel\Router\RouterCompositeInterface |
Return router used for output messages. |
|
getRouter ( ) : Kraken\Channel\Router\RouterCompositeInterface |
Return router which is being used by Channel. |
|
isConnected ( string | string[] $name ) : boolean | bool[] |
Check if specific external channel is connected. |
|
isStarted ( ) : boolean | bool[] |
Check if channel is started. |
|
isStopped ( ) : boolean | bool[] |
Check if channel is stopped. |
|
onConnect ( callable $handler ) : EventListener |
Attach connect event handler. |
|
onDisconnect ( callable $handler ) : EventListener |
Attach disconnect event handler. |
|
onInput ( callable $handler ) : EventListener |
Attach input event handler. |
|
onOutput ( callable $handler ) : EventListener |
Attach output event handler. |
|
onStart ( callable $handler ) : EventListener |
Attach start event handler. |
|
onStop ( callable $handler ) : EventListener |
Attach stop event handler. |
|
pull ( string $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol ) |
Pull message from sender. |
|
push ( string | string[] $name, string | string[] | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : RequestRecord | RequestRecord[] | null | null[] | boolean | bool[] |
Push one or multiple messages to one or more receivers. |
|
pushAsync ( string | string[] $name, string | string[] | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT ) : boolean | bool[] |
Push one or multiple asynchronous messages to one or more receivers. |
|
pushRequest ( string | string[] $name, string | string[] | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : RequestRecord | RequestRecord[] | null | null[] |
Push one or multiple requests to one or more receivers. |
|
receive ( string $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol ) |
Receive message from sender. |
|
send ( string | string[] $name, string | string[] | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : mixed | mixed[] |
Send one or multiple messages to one or more receivers. |
|
sendAsync ( string | string[] $name, string | string[] | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT ) : boolean | bool[] |
Send one or multiple asynchronous messages to one or more receivers. |
|
sendRequest ( string | string[] $name, string | string[] | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : boolean | bool[] |
Send one or multiple requests to one or more receivers. |
|
start ( ) |
Start channel. |
|
stop ( ) |
Stop channel. |
|