|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 8192 (0x2000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Broker_Work, seg_04b2c1
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Database;
with Identifier;
with Message_New;
with Message_Transport;
with Method;
with Text_Io;
with Memory;
use Text_Io;
package body Broker_Work is
Quiet : Boolean := True;
T : Memory.File;
Count : Natural := 0;
procedure Process_Message (M : String);
procedure Log (Item : String) is
begin
if not Quiet then
Text_Io.Put_Line (Item);
end if;
end Log;
procedure Register (Host : String; Socket : Message_Transport.Socket);
task Rx is
entry Start;
end Rx;
function Stub (M : String) return Boolean is
begin
return True;
end Stub;
procedure Stub is
begin
null;
end Stub;
procedure Transport_Start is
new Message_Transport.Start_Server (Register_Service => Register,
Service_Identified => Stub,
Ready_To_Receive => Stub,
Receive_Callback => Process_Message);
procedure Send_Message (Message : Standard.Message_New.Object;
Status : out Message_Transport.Status_Code) is
Id : Identifier.Object :=
Identifier.Value (Standard.Message_New.Get_Addressee (Message));
use Standard.Message_New;
begin
Message_Transport.Put (Message => Standard.Message_New.Image (Message),
Remote_Host => Identifier.Get_Host (Id),
Remote_Socket => Identifier.Get_Socket (Id),
Number_Of_Retry => 10,
Retry_Delay => 0.1,
Status => Status);
end Send_Message;
task body Rx is
begin
accept Start;
Transport_Start (Local_Socket =>
Identifier.Get_Socket (Id => Identifier.Broker),
Buffer_Size => 1024,
Wait_For_Identification => False);
end Rx;
procedure Start (Quiet : Boolean := True) is
begin
Broker_Work.Quiet := Quiet;
Rx.Start;
end Start;
procedure Register (Host : String; Socket : Message_Transport.Socket) is
begin
Text_Io.Put_Line ("+++ starting broker");
Text_Io.Put_Line ("--- Host => " & Host);
Text_Io.Put_Line ("--- socket => " &
Integer'Image (Integer ((Socket))));
end Register;
procedure Stale (Behavior : Natural) is
begin
--[prototype: This simply removes the behavior]
Database.Expunge (Behavior);
Identifier.Unregister (Id => Identifier.Value (Behavior));
end Stale;
procedure Registration (M : Message_New.Object) is separate;
procedure Unregistration (M : in out Message_New.Object) is separate;
procedure Query (M : Message_New.Object) is separate;
procedure Request (M : Message_New.Object;
Save : in out Memory.File) is separate;
procedure Notification (M : Message_New.Object) is separate;
procedure Forward (M : Message_New.Object;
Save : in out Memory.File) is separate;
procedure Publication (M : Message_New.Object) is separate;
procedure Unpublication (M : Message_New.Object) is separate;
procedure Subscription (M : Message_New.Object) is separate;
procedure Unsubscription (M : Message_New.Object) is separate;
procedure Process_Message (M : String) is
use Message_New;
Mes : Message_New.Object;
begin
Mes := Message_New.Value (M);
case Message_New.Get_Class (Mes) is
when Registration =>
Registration (Mes);
when Unregistration =>
Unregistration (Mes);
when Message_New.Query =>
Query (Mes);
when Message_New.Request =>
Request (Mes, T);
when Message_New.Notification =>
Notification (Mes);
when Message_New.Forward =>
Forward (Mes, T);
when Message_New.Publication =>
Publication (Mes);
when Message_New.Unpublication =>
Unpublication (Mes);
when Message_New.Subscription =>
Subscription (Mes);
when Message_New.Unsubscription =>
Unsubscription (Mes);
end case;
end Process_Message;
end Broker_Work;
nblk1=7
nid=3
hdr6=c
[0x00] rec0=2f rec1=00 rec2=01 rec3=056
[0x01] rec0=18 rec1=00 rec2=02 rec3=07e
[0x02] rec0=01 rec1=00 rec2=07 rec3=050
[0x03] rec0=21 rec1=00 rec2=06 rec3=05e
[0x04] rec0=1f rec1=00 rec2=04 rec3=014
[0x05] rec0=13 rec1=00 rec2=05 rec3=000
[0x06] rec0=0d rec1=00 rec2=02 rec3=000
tail 0x215483910867c70926e2f 0x42a00088462060003
Free Block Chain:
0x3: 0000 00 00 00 2b 80 28 64 75 72 65 20 52 65 71 75 65 ┆ + (dure Reque┆