fiam_version: '0.2' instance: id: specimen.java.serviceloader kind: specimen title: Java ServiceLoader provider interface status: provisional intent: Exercise an in-process library/service-provider interface with discovery but no network or wire protocol. nodes: - id: node.java-application kind: system-node name: Java Application node_type: fiam.node-type.process - id: node.provider-module kind: system-node name: Provider Module node_type: fiam.node-type.library-module ports: - id: port.app.spi owner: node.java-application participations: - contract: contract.payment-provider-spi mode: requires roles: - fiam.role.service-consumer - id: port.provider.spi owner: node.provider-module participations: - contract: contract.payment-provider-spi mode: offers roles: - fiam.role.service-provider contracts: - id: contract.payment-provider-spi kind: interface-contract purpose: - fiam.purpose.extension-point contract_forms: - fiam.contract-form.language-interface operations: - id: operation.provider.execute name: execute interaction_style: fiam.interaction-style.function-call artifacts: - id: artifact.java-interface kind: artifact artifact_type: fiam.artifact.source-code-interface describes: contract.payment-provider-spi locator: com.example.PaymentProvider - id: artifact.service-registration kind: artifact artifact_type: fiam.artifact.service-provider-registration implements: contract.payment-provider-spi locator: META-INF/services/com.example.PaymentProvider bindings: - id: binding.java.serviceloader contract: contract.payment-provider-spi provider_port: port.provider.spi consumer_ports: - port.app.spi binding_profile: fiam.binding-profile.java-serviceloader communication_stack: - role: fiam.stack-role.runtime term: fiam.runtime.jvm - role: fiam.stack-role.invocation-mechanism term: fiam.carrier.in-process-method-call discovery: kind: fiam.discovery.runtime-service-provider-loading source: artifact.service-registration interactions: - id: interaction.provider-call operation: operation.provider.execute binding: binding.java.serviceloader temporal_semantics: fiam.temporal.synchronous execution_boundary: fiam.execution-boundary.in-process assertions: - id: assertion.no-network subject: binding.java.serviceloader predicate: fiam.property.network-required value: false evidence: mode: fiam.evidence.static-observed source: artifact.service-registration confidence: 0.95 assertion_kind: property polarity: asserted - id: assertion.binding-discovered-via-registration assertion_kind: relation subject: binding.java.serviceloader predicate: fiam.relation.discovered-via object_ref: artifact.service-registration polarity: asserted evidence: mode: fiam.evidence.static-observed source: artifact.service-registration confidence: 0.99 tests: stresses: - library-interface - runtime-discovery - in-process-binding - artifact-evidence notes: - FIAM does not assume that interfaces are networked or serialized. expected_properties: - id: check.evidence kind: all-assertions-have-evidence - id: check.no-deprecated kind: no-deprecated-terms - id: check.no-legacy-representations kind: no-legacy-representations