Files
2022B2-REB/Assignment-3/seller.ol
NikolajDanger 0844b209b1
2023-01-13 14:30:29 +01:00

42 lines
1008 B
Plaintext

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" )()
}
}
}