This commit is contained in:
NikolajDanger
2023-01-13 14:30:29 +01:00
parent 4afc1d17df
commit 0844b209b1
287 changed files with 28523 additions and 0 deletions

41
Assignment-3/seller.ol Normal file
View File

@ -0,0 +1,41 @@
from BuyerServiceInterfaceModule import BuyerSellerInterface
from SellerShipperServiceInterfaceModule import SellerInterface, ShipperInterface
include "console.iol"
service SellerService {
execution { concurrent }
outputPort Buyer {
Location: "socket://localhost:9004"
Protocol: http { format = "json" }
Interfaces: BuyerSellerInterface
}
outputPort Shipper {
Location: "socket://localhost:9006"
Protocol: http { format = "json" }
Interfaces: ShipperInterface
}
inputPort BuyerSeller {
location: "socket://localhost:9005"
protocol: http { format = "json" }
interfaces: SellerInterface
}
main {
[ask(product)] {
println@Console( "Price requested" )()
quote@Buyer(17)
}
[accept(order)] {
println@Console( "Accepted" )()
order@Shipper(order)
}
[reject(order)] {
println@Console( "Rejected" )()
}
}
}