Soya uses the the Abstract Factory and Builder pattern to create protocol family objects without specifying their concrete classes.
This allows further protocol frameworks to added to Soya without changing or recompiling existing code (see Configuration Section).
The following diagram shows how the SsdlDescriptionBuilder uses the IProtocolFactory to first create an IProtocolBuilder which it will use to build the concrete IProtocol.
The next diagram shows how a StateMachine instance is build (in)dependent of the protocol we are using. The SoyaRuntime is initialized with a reference to a concrete IProtocolFactory and a SsdlDescription. It uses the factory to create a IStateMachineBuilder which it will then use to build a StateMachine instance.