Skip to content

Commit 10ac482

Browse files
committed
+add signals and initialization routine to BaseAgentClient
+added signal* to IAgentAware
1 parent dff9dac commit 10ac482

File tree

2 files changed

+58
-4
lines changed

2 files changed

+58
-4
lines changed

src/Job/AgentClient/BaseAgentClient.php

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,23 @@ static function getConfiguredInstance(): BaseAgentClient
2929
return self::$hInstance;
3030
}
3131

32+
public function registerJob(array $aSettings)
33+
{
34+
35+
}
36+
37+
38+
public function setAgentInitializationRoutine(callable $hAgentCallback): void
39+
{
40+
41+
}
42+
43+
protected function getAgentInitializationRoutine(): callable
44+
{
45+
# code...
46+
}
47+
48+
3249
public function getEvent(): Message
3350
{
3451
# code...
@@ -40,4 +57,41 @@ public function waitEvent(int $iTimeout=0, int $iBatchSize=1): array
4057
# code...
4158
return [];
4259
}
60+
61+
public function getStartUpChannels(): array //Channel[]
62+
{
63+
64+
}
65+
public function getSystemChannels(): array //Channel[]
66+
{
67+
68+
}
69+
70+
71+
//signals
72+
73+
protected function sendSignal(Type $var = null)
74+
{
75+
# code...
76+
}
77+
78+
public function sendStartupSignal(): bool
79+
{
80+
# code...
81+
}
82+
83+
public function sendShutdownSignal(): bool
84+
{
85+
86+
}
87+
88+
public function sendHaltSignal(): bool
89+
{
90+
# code...
91+
}
92+
93+
public function sendContinueSignal(): bool
94+
{
95+
# code...
96+
}
4397
}

src/Job/AgentClient/IAgentAware.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ function setAgentInitializationRoutine(callable $hAgentCallback): void;
77

88
function registerJob(array $aSettings);
99

10-
function signalStartup(): bool;
11-
function signalShutdown(): bool;
12-
function signalHalt(): bool;
13-
function signalContinue(): bool;
10+
function sendStartupSignal(): bool;
11+
function sendShutdownSignal(): bool;
12+
function sendHaltSignal(): bool;
13+
function sendContinueSignal(): bool;
1414

1515
// protected function signalAgent(string $sSignalName, $sSignalData): bool;
1616

0 commit comments

Comments
 (0)