Ports

Let us recall the concepts of input ports and output ports seen in the Behaviour and Deployment section.

There are two kinds of ports: input ports, which expose input operations to other services, and output ports, defining how to invoke the operations of other services.

Location, protocol and interface are the three elements in the definition of ports.

Location and protocol define the concrete binding information between a Jolie program and other service, interfaces specify type information expected to be satisfied by the behaviour that uses the port.

The syntax of input and output ports

The syntax for input and output ports is, respectively:

inputPort id {
    Location: URI
    Protocol: p
    Interfaces: iface_1, 
                ..., 
                iface_n
}
outputPort id {
    Location: URI
    Protocol: p
    Interfaces: iface_1, 
                ..., 
                iface_n
}

where URI is a URI (Uniform Resource Identifier), defining the location of the port; id, p and iface_i are the identifiers representing, respectively, the name of the port, the data protocol to use, and the interfaces accessible through the port.

results matching ""

    No results matching ""