[Server] Simplify server extensibility with pluggable method handlers (#100)
* refactor: use a custom method handler registration system * refactor: remove redundant Completer and CompleterInterface * docs: update server-builder documentation to reflect custom method handler changes
This commit is contained in:
parent
e94fd82061
commit
fcf605d5d7
1 changed files with 896 additions and 2865 deletions
|
|
@ -57,10 +57,10 @@ class HandlerTest extends TestCase
|
|||
$sessionStore->method('exists')->willReturn(true);
|
||||
|
||||
$jsonRpc = new JsonRpcHandler(
|
||||
MessageFactory::make(),
|
||||
$sessionFactory,
|
||||
$sessionStore,
|
||||
[$handlerA, $handlerB, $handlerC]
|
||||
methodHandlers: [$handlerA, $handlerB, $handlerC],
|
||||
messageFactory: MessageFactory::make(),
|
||||
sessionFactory: $sessionFactory,
|
||||
sessionStore: $sessionStore,
|
||||
);
|
||||
$sessionId = Uuid::v4();
|
||||
$result = $jsonRpc->process(
|
||||
|
|
@ -103,10 +103,10 @@ class HandlerTest extends TestCase
|
|||
$sessionStore->method('exists')->willReturn(true);
|
||||
|
||||
$jsonRpc = new JsonRpcHandler(
|
||||
MessageFactory::make(),
|
||||
$sessionFactory,
|
||||
$sessionStore,
|
||||
[$handlerA, $handlerB, $handlerC]
|
||||
methodHandlers: [$handlerA, $handlerB, $handlerC],
|
||||
messageFactory: MessageFactory::make(),
|
||||
sessionFactory: $sessionFactory,
|
||||
sessionStore: $sessionStore,
|
||||
);
|
||||
$sessionId = Uuid::v4();
|
||||
$result = $jsonRpc->process(
|
||||
|
|
|
|||
Loading…
Reference in a new issue