DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 3991 (0xf97) Types: TextFile Names: »B«
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16 └─ ⟦6f12a12be⟧ »DATA« └─⟦this⟧
with Database; with Identifier; with Message; with Message_Transport; with Method; with Text_Io; use Text_Io; package body Broker is procedure Process_Message (M : String); 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 is begin 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;