PHP 클래스 Kraken\Channel\ChannelComposite

상속: extends Kraken\Event\BaseEventEmitter, implements Kraken\Channel\ChannelCompositeInterface, use trait Kraken\Loop\LoopAwareTrait
파일 보기 프로젝트 열기: kraken-php/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$buses Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[]
$counter integer
$events Kraken\Event\EventListener[][]
$name string
$router Kraken\Channel\Router\RouterCompositeInterface
$seed string

공개 메소드들

메소드 설명
__construct ( string $name, Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[] $buses = [], Kraken\Channel\Router\RouterCompositeInterface $router, Kraken\Loop\LoopInterface $loop )
__destruct ( )
createProtocol ( $message = null )
existsBus ( $name )
filterConnected ( $pattern )
getBus ( $name )
getBuses ( )
getConnected ( )
getInput ( )
getModel ( )
getName ( )
getOutput ( )
getRouter ( )
handleReceive ( string $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol )
isConnected ( $name )
isStarted ( )
isStopped ( )
onConnect ( callable $handler )
onDisconnect ( callable $handler )
onInput ( callable $handler )
onOutput ( callable $handler )
onStart ( callable $handler )
onStop ( callable $handler )
pull ( $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol )
push ( $name, $message, $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
pushAsync ( $name, $message, $flags = Channel::MODE_DEFAULT )
pushRequest ( $name, $message, $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
receive ( $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol )
removeBus ( $name )
send ( $name, $message, $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
sendAsync ( $name, $message, $flags = Channel::MODE_DEFAULT )
sendRequest ( $name, $message, $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
setBus ( $name, $channel )
start ( )
stop ( )

보호된 메소드들

메소드 설명
createMessageProtocol ( Kraken\Channel\Protocol\ProtocolInterface | null | string | string[] $message ) : Kraken\Channel\Protocol\ProtocolInterface
genID ( ) : string
getNextSuffix ( ) : integer
getTime ( ) : float
handlePushAsync ( string $name, Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT ) : boolean
handlePushRequest ( string $name, string | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : boolean
handleSendAsync ( string $name, Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT ) : boolean
handleSendRequest ( string $name, string | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : bool[]

비공개 메소드들

메소드 설명
combine ( mixed | mixed[] | null $in, mixed | mixed[] | null $out, callable $combinator ) : mixed | mixed[]

메소드 상세

__construct() 공개 메소드

public __construct ( string $name, Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[] $buses = [], Kraken\Channel\Router\RouterCompositeInterface $router, Kraken\Loop\LoopInterface $loop )
$name string
$buses Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[]
$router Kraken\Channel\Router\RouterCompositeInterface
$loop Kraken\Loop\LoopInterface

__destruct() 공개 메소드

public __destruct ( )

createMessageProtocol() 보호된 메소드

protected createMessageProtocol ( Kraken\Channel\Protocol\ProtocolInterface | null | string | string[] $message ) : Kraken\Channel\Protocol\ProtocolInterface
$message Kraken\Channel\Protocol\ProtocolInterface | null | string | string[]
리턴 Kraken\Channel\Protocol\ProtocolInterface

createProtocol() 공개 메소드

public createProtocol ( $message = null )

existsBus() 공개 메소드

public existsBus ( $name )

filterConnected() 공개 메소드

public filterConnected ( $pattern )

genID() 보호된 메소드

protected genID ( ) : string
리턴 string

getBus() 공개 메소드

public getBus ( $name )

getBuses() 공개 메소드

public getBuses ( )

getConnected() 공개 메소드

public getConnected ( )

getInput() 공개 메소드

public getInput ( )

getModel() 공개 메소드

public getModel ( )

getName() 공개 메소드

public getName ( )

getNextSuffix() 보호된 메소드

protected getNextSuffix ( ) : integer
리턴 integer

getOutput() 공개 메소드

public getOutput ( )

getRouter() 공개 메소드

public getRouter ( )

getTime() 보호된 메소드

protected getTime ( ) : float
리턴 float

handlePushAsync() 보호된 메소드

protected handlePushAsync ( string $name, Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT ) : boolean
$name string
$message Kraken\Channel\Protocol\ProtocolInterface
$flags integer
리턴 boolean

handlePushRequest() 보호된 메소드

protected handlePushRequest ( string $name, string | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : boolean
$name string
$message string | Kraken\Channel\Protocol\ProtocolInterface
$flags integer
$success callable
$failure callable
$cancel callable
$timeout float
리턴 boolean

handleReceive() 공개 메소드

public handleReceive ( string $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol )
$sender string
$protocol Kraken\Channel\Protocol\ProtocolInterface

handleSendAsync() 보호된 메소드

protected handleSendAsync ( string $name, Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT ) : boolean
$name string
$message Kraken\Channel\Protocol\ProtocolInterface
$flags integer
리턴 boolean

handleSendRequest() 보호된 메소드

protected handleSendRequest ( string $name, string | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : bool[]
$name string
$message string | Kraken\Channel\Protocol\ProtocolInterface
$flags integer
$success callable
$failure callable
$cancel callable
$timeout float
리턴 bool[]

isConnected() 공개 메소드

public isConnected ( $name )

isStarted() 공개 메소드

public isStarted ( )

isStopped() 공개 메소드

public isStopped ( )

onConnect() 공개 메소드

public onConnect ( callable $handler )
$handler callable

onDisconnect() 공개 메소드

public onDisconnect ( callable $handler )
$handler callable

onInput() 공개 메소드

public onInput ( callable $handler )
$handler callable

onOutput() 공개 메소드

public onOutput ( callable $handler )
$handler callable

onStart() 공개 메소드

public onStart ( callable $handler )
$handler callable

onStop() 공개 메소드

public onStop ( callable $handler )
$handler callable

pull() 공개 메소드

public pull ( $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol )
$protocol Kraken\Channel\Protocol\ProtocolInterface

push() 공개 메소드

public push ( $name, $message, $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
$success callable
$failure callable
$cancel callable

pushAsync() 공개 메소드

public pushAsync ( $name, $message, $flags = Channel::MODE_DEFAULT )

pushRequest() 공개 메소드

public pushRequest ( $name, $message, $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
$success callable
$failure callable
$cancel callable

receive() 공개 메소드

public receive ( $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol )
$protocol Kraken\Channel\Protocol\ProtocolInterface

removeBus() 공개 메소드

public removeBus ( $name )

send() 공개 메소드

public send ( $name, $message, $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
$success callable
$failure callable
$cancel callable

sendAsync() 공개 메소드

public sendAsync ( $name, $message, $flags = Channel::MODE_DEFAULT )

sendRequest() 공개 메소드

public sendRequest ( $name, $message, $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
$success callable
$failure callable
$cancel callable

setBus() 공개 메소드

public setBus ( $name, $channel )

start() 공개 메소드

public start ( )

stop() 공개 메소드

public stop ( )

프로퍼티 상세

$buses 보호되어 있는 프로퍼티

protected ChannelInterface[],Kraken\Channel|ChannelCompositeInterface[],Kraken\Channel $buses
리턴 Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[]

$counter 보호되어 있는 프로퍼티

protected int $counter
리턴 integer

$events 보호되어 있는 프로퍼티

protected EventListener[][],Kraken\Event $events
리턴 Kraken\Event\EventListener[][]

$name 보호되어 있는 프로퍼티

protected string $name
리턴 string

$router 보호되어 있는 프로퍼티

protected RouterCompositeInterface,Kraken\Channel\Router $router
리턴 Kraken\Channel\Router\RouterCompositeInterface

$seed 보호되어 있는 프로퍼티

protected string $seed
리턴 string