Метод | Описание | |
---|---|---|
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 ) : |
Attach connect event handler. | |
onDisconnect ( callable $handler ) : |
Attach disconnect event handler. | |
onInput ( callable $handler ) : |
Attach input event handler. | |
onOutput ( callable $handler ) : |
Attach output event handler. | |
onStart ( callable $handler ) : |
Attach start event handler. | |
onStop ( callable $handler ) : |
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 ) : |
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 ) : |
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. |
public createProtocol ( string | string[] | null $message = null ) : Kraken\Channel\Protocol\ProtocolInterface | ||
$message | string | string[] | null | |
Результат | Kraken\Channel\Protocol\ProtocolInterface |
public filterConnected ( string | string[] $pattern ) : string[] | ||
$pattern | string | string[] | |
Результат | string[] |
public getConnected ( ) : string[] | ||
Результат | string[] |
public getInput ( ) : Kraken\Channel\Router\RouterInterface | Kraken\Channel\Router\RouterCompositeInterface | ||
Результат | Kraken\Channel\Router\RouterInterface | Kraken\Channel\Router\RouterCompositeInterface |
public getOutput ( ) : Kraken\Channel\Router\RouterInterface | Kraken\Channel\Router\RouterCompositeInterface | ||
Результат | Kraken\Channel\Router\RouterInterface | Kraken\Channel\Router\RouterCompositeInterface |
public getRouter ( ) : Kraken\Channel\Router\RouterCompositeInterface | ||
Результат | Kraken\Channel\Router\RouterCompositeInterface |
public isConnected ( string | string[] $name ) : boolean | bool[] | ||
$name | string | string[] | |
Результат | boolean | bool[] |
public onDisconnect ( callable $handler ) : |
||
$handler | callable | |
Результат |
public 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 ) : |
||
$name | string | string[] | |
$message | string | string[] | Kraken\Channel\Protocol\ProtocolInterface | |
$flags | integer | |
$success | callable | |
$failure | callable | |
$cancel | callable | |
$timeout | float | |
Результат |
public pushAsync ( string | string[] $name, string | string[] | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT ) : boolean | bool[] | ||
$name | string | string[] | |
$message | string | string[] | Kraken\Channel\Protocol\ProtocolInterface | |
$flags | integer | |
Результат | boolean | bool[] |
public 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 ) : |
||
$name | string | string[] | |
$message | string | string[] | Kraken\Channel\Protocol\ProtocolInterface | |
$flags | integer | |
$success | callable | |
$failure | callable | |
$cancel | callable | |
$timeout | float | |
Результат |
public 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[] | ||
$name | string | string[] | |
$message | string | string[] | Kraken\Channel\Protocol\ProtocolInterface | |
$flags | integer | |
$success | callable | |
$failure | callable | |
$cancel | callable | |
$timeout | float | |
Результат | mixed | mixed[] |
public sendAsync ( string | string[] $name, string | string[] | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT ) : boolean | bool[] | ||
$name | string | string[] | |
$message | string | string[] | Kraken\Channel\Protocol\ProtocolInterface | |
$flags | integer | |
Результат | boolean | bool[] |
public 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[] | ||
$name | string | string[] | |
$message | string | string[] | Kraken\Channel\Protocol\ProtocolInterface | |
$flags | integer | |
$success | callable | |
$failure | callable | |
$cancel | callable | |
$timeout | float | |
Результат | boolean | bool[] |