# Provided and Required Interface

**In short:** A provided interface lists what a component offers. A required interface lists what it needs from others. UML draws them as a ball and a socket, which makes the dependencies between building blocks visible.

## Explanation

A component is a building block of a system. It usually works with other building blocks. Two ideas describe how it connects to them: what it offers, and what it needs.

**Provided interface.** This is what a component offers to others. In a UML component diagram (see UML Component Diagram), it appears as a ball, also called a lollipop. The ball carries the name of the interface. A solid line links it to the component that provides it.

**Required interface.** This is what a component needs from others. It is a usage dependency. UML draws it as a half-circle, called a socket, attached to the component that has the need.

**Who defines it.** A common view is that the supplier decides what to expose. A required interface turns this around. The client of an interaction defines it.

**Why show them.** arc42 recommends ball and socket notation. It makes explicit which services, data, or events a providing building block offers.

**Ports.** A port is a point on a component where interfaces attach (see Port). arc42 suggests using ball and socket together with port symbols. In a modeling tool, the port shows its provided and required interfaces in ball-socket notation. A realization dependency (provided) or a usage dependency (required) is created from the port type. A port can provide or require many interfaces. It therefore groups them, and you can choose which ones to display.

## Example

An online shop has an Order component and a Payment component. Payment offers a "Charge" interface, drawn as a ball. Order needs a way to charge customers, so it shows a socket named "Charge". Reading the diagram, you see that Order depends on Payment through "Charge". Order's needs define what "Charge" must contain. Payment provides it.

## Trade-offs

Ports group many interfaces, so a diagram can show only some of them. This keeps pictures readable. It also means a reader may not see every interface unless the hidden ones are documented elsewhere.

Payment provides the Charge interface (realization). Order requires it (usage dependency).

```plantuml
@startuml
component Order
component Payment
interface Charge
Payment -( Charge
Payment ..|> Charge
Order ..> Charge : use
@enduml
```

## Checks

- Provided interfaces are drawn as balls that name the services, data, or events a building block offers.
- Required interfaces are drawn as sockets on the component that depends on them.
- Ball and socket notation is combined with port symbols where a component has several interfaces.

## Related

- [UML Interface](https://arc.fuet.ch/concepts/modeling-uml/uml-interface.md)
- [UML Component Diagram](https://arc.fuet.ch/concepts/modeling-uml/uml-component-diagram.md)
- [Port](https://arc.fuet.ch/concepts/modeling-uml/component-port.md)
- [Component Connector (Assembly and Delegation)](https://arc.fuet.ch/concepts/modeling-uml/component-connector-assembly-and-delegation.md)
- [Component View](https://arc.fuet.ch/concepts/documentation/component-view.md)
- [Common Component Diagram Mistake](https://arc.fuet.ch/concepts/modeling-uml/component-diagram-modeling-mistakes.md)

## Sources

- [Component diagram - Wikipedia](https://en.wikipedia.org/wiki/Component_diagram) — en.wikipedia.org, accessed 2026-11-09
- [Question D-5: How can I describe interfaces with UML? | arc42 FAQ](https://faq.arc42.org/questions/D-5/) — faq.arc42.org, accessed 2026-11-09
- [Required Interface](https://martinfowler.com/bliki/RequiredInterface.html) — martinfowler.com, accessed 2026-11-09
- [Provided and Required Interfaces](https://docs.nomagic.com/MT/2026x/magic-cyber-systems-engineer---cameo-systems-modeler/provided-and-required-interfaces-272731184.html) — docs.nomagic.com, accessed 2026-11-09
