@@ -0,0 +1,1334 @@
+package com.tradeshift.reaktive.akka;%0A%0Aimport akka.actor.AbstractExtensionId;%0Aimport akka.actor.ActorSystem;%0Aimport akka.actor.ExtendedActorSystem;%0Aimport akka.actor.Extension;%0Aimport akka.actor.ExtensionIdProvider;%0Aimport akka.stream.ActorMaterializer;%0A%0A/**%0A * Maintains a singleton actor materializer that can be shared and looked up amongst an actor system without the need%0A * to pass it along constructors. %0A */%0Apublic class SharedActorMaterializer implements Extension %7B%0A    private static class Id extends AbstractExtensionId%3CSharedActorMaterializer%3E implements ExtensionIdProvider %7B%0A        private final static Id INSTANCE = new Id();%0A%0A        private Id() %7B%7D%0A%0A        public Id lookup() %7B%0A            return INSTANCE;%0A        %7D%0A%0A        public SharedActorMaterializer createExtension(ExtendedActorSystem system) %7B%0A            return new SharedActorMaterializer(system);%0A        %7D%0A    %7D%0A%0A    /**%0A     * Returns a shareable ActorMaterializer that will be the same for all callers for the same ActorSystem.%0A     */%0A    public static ActorMaterializer get(ActorSystem system) %7B%0A        return Id.INSTANCE.get(system).materializer;%0A    %7D%0A%0A    private final ActorMaterializer materializer;%0A    %0A    private SharedActorMaterializer(ExtendedActorSystem system) %7B%0A        this.materializer = ActorMaterializer.create(system);%0A    %7D%0A%7D%0A

Allow shared actor materializer to be looked up through Extension