|
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 - download
Length: 8192 (0x2000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Broker, seg_02d491
└─⟦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; with Message_Transport; with Method; with Text_Io; use Text_Io; package body Broker is Quiet : Boolean := True; 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.Object; Status : out Message_Transport.Status_Code) is Id : Identifier.Object := Identifier.Value (Standard.Message.Get_Addressee (Message)); use Standard.Message; begin Message_Transport.Put (Message => Standard.Message.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.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.Object) is separate; procedure Unregistration (M : in out Message.Object) is separate; procedure Query (M : Message.Object) is separate; procedure Request (M : Message.Object) is separate; procedure Notification (M : Message.Object) is separate; procedure Forward (M : Message.Object) is separate; procedure Publication (M : Message.Object) is separate; procedure Unpublication (M : Message.Object) is separate; procedure Subscription (M : Message.Object) is separate; procedure Unsubscription (M : Message.Object) is separate; procedure Process_Message (M : String) is use Message; Mes : Message.Object; begin Mes := Message.Value (M); case Message.Get_Class (Mes) is when Registration => Registration (Mes); when Unregistration => Unregistration (Mes); when Message.Query => Query (Mes); when Message.Request => Request (Mes); when Message.Notification => Notification (Mes); when Message.Forward => Forward (Mes); when Message.Publication => Publication (Mes); when Message.Unpublication => Unpublication (Mes); when Message.Subscription => Subscription (Mes); when Message.Unsubscription => Unsubscription (Mes); end case; end Process_Message; end Broker;
nblk1=7 nid=7 hdr6=c [0x00] rec0=2c rec1=00 rec2=01 rec3=060 [0x01] rec0=18 rec1=00 rec2=06 rec3=00a [0x02] rec0=22 rec1=00 rec2=04 rec3=01c [0x03] rec0=00 rec1=00 rec2=03 rec3=046 [0x04] rec0=21 rec1=00 rec2=05 rec3=00c [0x05] rec0=0d rec1=00 rec2=02 rec3=000 [0x06] rec0=0d rec1=00 rec2=02 rec3=000 tail 0x21526812e844e5687dee1 0x42a00088462060003 Free Block Chain: 0x7: 0000 00 00 00 0d 80 0a 20 20 20 20 20 52 65 63 65 69 ┆ Recei┆