From 687d9e6f592adbd780c12ba1a94db7a7d61a78ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Demirta=C5=9F?= Date: Mon, 30 Sep 2024 20:32:25 +0300 Subject: [PATCH] rename. --- .../main/java/net/infumia/frame/Frame.java | 4 +- .../net/infumia/frame/context/Context.java | 2 +- ...Manager.java => PipelineContextFrame.java} | 10 +- .../context/PipelineContextState.java | 2 +- ...anager.java => PipelineExecutorFrame.java} | 12 +-- .../java/net/infumia/frame/FrameImpl.java | 8 +- .../frame/context/ContextBaseImpl.java | 8 +- .../infumia/frame/context/ContextImpl.java | 12 +-- .../frame/context/view/ContextRenderImpl.java | 4 +- .../pagination/ElementPaginationImpl.java | 2 +- ...nagers.java => PipelineContextFrames.java} | 42 ++++---- .../context/PipelineContextStates.java | 20 ++-- ...pl.java => PipelineExecutorFrameImpl.java} | 38 ++++---- .../executor/PipelineExecutorStateImpl.java | 4 +- .../pipeline/holder/PipelineHolderFrame.java | 96 +++++++++++++++++++ .../holder/PipelineHolderManager.java | 96 ------------------- .../service/element/ServiceClearLogging.java | 2 +- .../service/element/ServiceClickLogging.java | 2 +- .../service/element/ServiceRenderLogging.java | 2 +- .../service/element/ServiceUpdateLogging.java | 2 +- .../ServiceListenerRegistered.java | 10 +- .../ServiceListenerRegisteredLogging.java | 10 +- .../ServiceViewCreated.java | 10 +- .../ServiceViewRegistered.java | 10 +- .../ServiceViewUnregisteredLogging.java | 10 +- .../render/ServiceFirstRenderLogging.java | 2 +- .../render/ServiceFirstRenderWatchState.java | 4 +- .../render/ServiceOpenContainerLogging.java | 2 +- .../service/render/ServiceResumeLogging.java | 2 +- .../service/render/ServiceStartUpdate.java | 6 +- .../render/ServiceStartUpdateInvalidate.java | 2 +- .../render/ServiceStartUpdateLogging.java | 2 +- .../render/ServiceStopUpdateLogging.java | 2 +- .../service/render/ServiceUpdateLogging.java | 2 +- .../service/state/ServiceAccessLogging.java | 2 +- .../service/state/ServiceUpdateLogging.java | 2 +- .../view/ServiceClickInteractionDelay.java | 2 +- .../service/view/ServiceClickLogging.java | 2 +- .../service/view/ServiceCloseCancel.java | 2 +- .../service/view/ServiceCloseLogging.java | 2 +- .../service/view/ServiceCreateContainer.java | 2 +- .../service/view/ServiceCreateViewers.java | 2 +- .../service/view/ServiceInitLogging.java | 2 +- .../view/ServiceLayoutResolutionLogging.java | 2 +- .../view/ServiceModifyContainerLogging.java | 2 +- .../service/view/ServiceOpenLogging.java | 2 +- ...eProcessConfigModifierAddSizeModifier.java | 2 +- .../ServiceProcessConfigModifierLogging.java | 2 +- .../view/ServiceTransitionLogging.java | 2 +- .../service/viewer/ServiceAddedLogging.java | 2 +- .../service/viewer/ServiceRemovedLogging.java | 2 +- .../frame/state/value/StateValueHostImpl.java | 14 +-- 52 files changed, 245 insertions(+), 245 deletions(-) rename common/src/main/java/net/infumia/frame/pipeline/context/{PipelineContextManager.java => PipelineContextFrame.java} (68%) rename common/src/main/java/net/infumia/frame/pipeline/executor/{PipelineExecutorManager.java => PipelineExecutorFrame.java} (82%) rename core/src/main/java/net/infumia/frame/pipeline/context/{PipelineContextManagers.java => PipelineContextFrames.java} (68%) rename core/src/main/java/net/infumia/frame/pipeline/executor/{PipelineExecutorManagerImpl.java => PipelineExecutorFrameImpl.java} (71%) create mode 100644 core/src/main/java/net/infumia/frame/pipeline/holder/PipelineHolderFrame.java delete mode 100644 core/src/main/java/net/infumia/frame/pipeline/holder/PipelineHolderManager.java rename core/src/main/java/net/infumia/frame/pipeline/service/{manager => frame}/ServiceListenerRegistered.java (61%) rename core/src/main/java/net/infumia/frame/pipeline/service/{manager => frame}/ServiceListenerRegisteredLogging.java (62%) rename core/src/main/java/net/infumia/frame/pipeline/service/{manager => frame}/ServiceViewCreated.java (80%) rename core/src/main/java/net/infumia/frame/pipeline/service/{manager => frame}/ServiceViewRegistered.java (88%) rename core/src/main/java/net/infumia/frame/pipeline/service/{manager => frame}/ServiceViewUnregisteredLogging.java (57%) diff --git a/common/src/main/java/net/infumia/frame/Frame.java b/common/src/main/java/net/infumia/frame/Frame.java index 45048f8..037d350 100644 --- a/common/src/main/java/net/infumia/frame/Frame.java +++ b/common/src/main/java/net/infumia/frame/Frame.java @@ -6,7 +6,7 @@ import net.infumia.frame.context.view.ContextRender; import net.infumia.frame.logger.Logger; import net.infumia.frame.pipeline.Pipelined; -import net.infumia.frame.pipeline.executor.PipelineExecutorManager; +import net.infumia.frame.pipeline.executor.PipelineExecutorFrame; import net.infumia.frame.task.TaskFactory; import net.infumia.frame.typedkey.TypedKeyStorageFactory; import net.infumia.frame.typedkey.TypedKeyStorageImmutableBuilder; @@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -public interface Frame extends Pipelined { +public interface Frame extends Pipelined { @NotNull static Frame create(@NotNull final Plugin plugin) { return Internal.factory().create(plugin); diff --git a/common/src/main/java/net/infumia/frame/context/Context.java b/common/src/main/java/net/infumia/frame/context/Context.java index cb329fd..75eb3b1 100644 --- a/common/src/main/java/net/infumia/frame/context/Context.java +++ b/common/src/main/java/net/infumia/frame/context/Context.java @@ -7,7 +7,7 @@ public interface Context extends StateFactory { @NotNull - Frame manager(); + Frame frame(); @NotNull TypedKeyStorage instances(); diff --git a/common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextManager.java b/common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextFrame.java similarity index 68% rename from common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextManager.java rename to common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextFrame.java index 5c55707..99d648f 100644 --- a/common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextManager.java +++ b/common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextFrame.java @@ -8,16 +8,16 @@ import net.infumia.frame.view.View; import org.jetbrains.annotations.NotNull; -public interface PipelineContextManager extends PipelineContext { +public interface PipelineContextFrame extends PipelineContext { @NotNull Frame frame(); - interface ViewCreated extends PipelineContextManager { + interface ViewCreated extends PipelineContextFrame { @NotNull Collection> registeredViews(); } - interface ViewRegistered extends PipelineContextManager { + interface ViewRegistered extends PipelineContextFrame { @NotNull Collection registeredViews(); @@ -25,9 +25,9 @@ interface ViewRegistered extends PipelineContextManager { Consumer instanceConfigurer(); } - interface ListenerRegistered extends PipelineContextManager {} + interface ListenerRegistered extends PipelineContextFrame {} - interface ViewUnregistered extends PipelineContextManager { + interface ViewUnregistered extends PipelineContextFrame { @NotNull Collection unregisteredViews(); } diff --git a/common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextState.java b/common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextState.java index 645d560..8d09203 100644 --- a/common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextState.java +++ b/common/src/main/java/net/infumia/frame/pipeline/context/PipelineContextState.java @@ -9,7 +9,7 @@ public interface PipelineContextState extends PipelineContext { @NotNull - Frame manager(); + Frame frame(); @NotNull State state(); diff --git a/common/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorManager.java b/common/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorFrame.java similarity index 82% rename from common/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorManager.java rename to common/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorFrame.java index 5448623..4794cc5 100644 --- a/common/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorManager.java +++ b/common/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorFrame.java @@ -3,14 +3,14 @@ import java.util.Collection; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; -import net.infumia.frame.pipeline.context.PipelineContextManager; +import net.infumia.frame.pipeline.context.PipelineContextFrame; import net.infumia.frame.service.ConsumerService; import net.infumia.frame.service.Implementation; import net.infumia.frame.typedkey.TypedKeyStorageImmutableBuilder; import net.infumia.frame.view.View; import org.jetbrains.annotations.NotNull; -public interface PipelineExecutorManager { +public interface PipelineExecutorFrame { @NotNull CompletableFuture> executeViewCreated( @NotNull Collection> registeredViews @@ -32,28 +32,28 @@ CompletableFuture executeViewUnregistered( void applyViewCreated( @NotNull Implementation< - PipelineContextManager.ViewCreated, + PipelineContextFrame.ViewCreated, Collection > implementation ); void applyViewRegistered( @NotNull Implementation< - PipelineContextManager.ViewRegistered, + PipelineContextFrame.ViewRegistered, Collection > implementation ); void applyListenersRegistered( @NotNull Implementation< - PipelineContextManager.ListenerRegistered, + PipelineContextFrame.ListenerRegistered, ConsumerService.State > implementation ); void applyViewUnregistered( @NotNull Implementation< - PipelineContextManager.ViewUnregistered, + PipelineContextFrame.ViewUnregistered, ConsumerService.State > implementation ); diff --git a/core/src/main/java/net/infumia/frame/FrameImpl.java b/core/src/main/java/net/infumia/frame/FrameImpl.java index 44e05bd..bcdba86 100644 --- a/core/src/main/java/net/infumia/frame/FrameImpl.java +++ b/core/src/main/java/net/infumia/frame/FrameImpl.java @@ -17,8 +17,8 @@ import net.infumia.frame.logger.Logger; import net.infumia.frame.metadata.MetadataAccessFactory; import net.infumia.frame.metadata.MetadataAccessFactoryImpl; -import net.infumia.frame.pipeline.executor.PipelineExecutorManager; -import net.infumia.frame.pipeline.executor.PipelineExecutorManagerImpl; +import net.infumia.frame.pipeline.executor.PipelineExecutorFrame; +import net.infumia.frame.pipeline.executor.PipelineExecutorFrameImpl; import net.infumia.frame.task.TaskFactory; import net.infumia.frame.task.TaskFactoryImpl; import net.infumia.frame.typedkey.TypedKeyStorageFactory; @@ -44,7 +44,7 @@ final class FrameImpl implements FrameRich { private final Collection> unregisteredViews = ConcurrentHashMap.newKeySet(); private final Map, View> registeredViews = new ConcurrentHashMap<>(); private final AtomicBoolean registered = new AtomicBoolean(false); - private final PipelineExecutorManager pipelines = new PipelineExecutorManagerImpl(this); + private final PipelineExecutorFrame pipelines = new PipelineExecutorFrameImpl(this); private final ViewCreator viewCreator = new ViewCreatorImpl(); private final Logger logger; private final TaskFactory taskFactory; @@ -256,7 +256,7 @@ public Frame with(@NotNull final Class viewClass) { @NotNull @Override - public PipelineExecutorManager pipelines() { + public PipelineExecutorFrame pipelines() { return this.pipelines; } diff --git a/core/src/main/java/net/infumia/frame/context/ContextBaseImpl.java b/core/src/main/java/net/infumia/frame/context/ContextBaseImpl.java index 667f796..56782fd 100644 --- a/core/src/main/java/net/infumia/frame/context/ContextBaseImpl.java +++ b/core/src/main/java/net/infumia/frame/context/ContextBaseImpl.java @@ -114,7 +114,7 @@ public boolean sharedView() { public CompletableFuture<@Nullable ContextRender> openForEveryone( @NotNull final Class viewClass ) { - return this.manager() + return this.frame() .open( this.viewers().stream().map(Viewer::player).collect(Collectors.toSet()), viewClass @@ -127,7 +127,7 @@ public boolean sharedView() { @NotNull final Class viewClass, @NotNull final Consumer initialDataConfigurer ) { - return this.manager() + return this.frame() .open( this.viewers().stream().map(Viewer::player).collect(Collectors.toSet()), viewClass, @@ -140,7 +140,7 @@ public boolean sharedView() { public CompletableFuture<@Nullable ContextRender> openForViewer( @NotNull final Class viewClass ) { - return this.manager().open(this.viewerOrThrow("openForViewer").player(), viewClass); + return this.frame().open(this.viewerOrThrow("openForViewer").player(), viewClass); } @NotNull @@ -149,7 +149,7 @@ public boolean sharedView() { @NotNull final Class viewClass, @NotNull final Consumer initialData ) { - return this.manager() + return this.frame() .open(this.viewerOrThrow("openForViewer").player(), viewClass, initialData); } diff --git a/core/src/main/java/net/infumia/frame/context/ContextImpl.java b/core/src/main/java/net/infumia/frame/context/ContextImpl.java index 05f379e..7f5b58a 100644 --- a/core/src/main/java/net/infumia/frame/context/ContextImpl.java +++ b/core/src/main/java/net/infumia/frame/context/ContextImpl.java @@ -8,29 +8,29 @@ public class ContextImpl extends StateFactoryImpl implements ContextRich { - private final Frame manager; + private final Frame frame; private final TypedKeyStorage instances; private final StateRegistry stateRegistry; public ContextImpl( - @NotNull final Frame manager, + @NotNull final Frame frame, @NotNull final TypedKeyStorage instances, @NotNull final StateRegistry stateRegistry ) { super(stateRegistry); - this.manager = manager; + this.frame = frame; this.instances = instances; this.stateRegistry = stateRegistry; } public ContextImpl(@NotNull final Context context) { - this(context.manager(), context.instances(), ((ContextRich) context).stateRegistry()); + this(context.frame(), context.instances(), ((ContextRich) context).stateRegistry()); } @NotNull @Override - public Frame manager() { - return this.manager; + public Frame frame() { + return this.frame; } @NotNull diff --git a/core/src/main/java/net/infumia/frame/context/view/ContextRenderImpl.java b/core/src/main/java/net/infumia/frame/context/view/ContextRenderImpl.java index d5feed5..80f9e4d 100644 --- a/core/src/main/java/net/infumia/frame/context/view/ContextRenderImpl.java +++ b/core/src/main/java/net/infumia/frame/context/view/ContextRenderImpl.java @@ -108,7 +108,7 @@ public void back() { metadata.remove(MetadataKeyHolder.PREVIOUS_VIEWS); } CompletableFutureExtensions.logError( - this.manager() + this.frame() .openActive(viewer.player(), previousContext) .thenCompose(__ -> ((ContextRenderRich) previousContext).simulateResume( @@ -116,7 +116,7 @@ public void back() { Collections.singleton(viewer) ) ), - this.manager().logger(), + this.frame().logger(), "An error occurred while going back to view '%s'.", previousContext.view().instance() ); diff --git a/core/src/main/java/net/infumia/frame/element/pagination/ElementPaginationImpl.java b/core/src/main/java/net/infumia/frame/element/pagination/ElementPaginationImpl.java index 394654a..2ad9d8f 100644 --- a/core/src/main/java/net/infumia/frame/element/pagination/ElementPaginationImpl.java +++ b/core/src/main/java/net/infumia/frame/element/pagination/ElementPaginationImpl.java @@ -225,7 +225,7 @@ public void switchTo(final int pageIndex) { } CompletableFutureExtensions.logError( this.pipelines.executeUpdate(host, false), - this.parent().manager().logger(), + this.parent().frame().logger(), "An error occurred while updating the pagination '%s'.", this ); diff --git a/core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextManagers.java b/core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextFrames.java similarity index 68% rename from core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextManagers.java rename to core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextFrames.java index 0985381..4216237 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextManagers.java +++ b/core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextFrames.java @@ -7,17 +7,17 @@ import net.infumia.frame.view.View; import org.jetbrains.annotations.NotNull; -public interface PipelineContextManagers { - final class ViewCreated implements PipelineContextManager.ViewCreated { +public interface PipelineContextFrames { + final class ViewCreated implements PipelineContextFrame.ViewCreated { - private final Frame manager; + private final Frame frame; private final Collection> registeredViews; public ViewCreated( - @NotNull final Frame manager, + @NotNull final Frame frame, @NotNull final Collection> registeredViews ) { - this.manager = manager; + this.frame = frame; this.registeredViews = registeredViews; } @@ -30,22 +30,22 @@ public Collection> registeredViews() { @NotNull @Override public Frame frame() { - return this.manager; + return this.frame; } } - final class ViewRegistered implements PipelineContextManager.ViewRegistered { + final class ViewRegistered implements PipelineContextFrame.ViewRegistered { - private final Frame manager; + private final Frame frame; private final Collection registeredViews; private final Consumer storageConfigurer; public ViewRegistered( - @NotNull final Frame manager, + @NotNull final Frame frame, @NotNull final Collection registeredViews, @NotNull final Consumer storageConfigurer ) { - this.manager = manager; + this.frame = frame; this.registeredViews = registeredViews; this.storageConfigurer = storageConfigurer; } @@ -53,7 +53,7 @@ public ViewRegistered( @NotNull @Override public Frame frame() { - return this.manager; + return this.frame; } @NotNull @@ -69,38 +69,38 @@ public Consumer instanceConfigurer() { } } - final class ListenerRegistered implements PipelineContextManager.ListenerRegistered { + final class ListenerRegistered implements PipelineContextFrame.ListenerRegistered { - private final Frame manager; + private final Frame frame; - public ListenerRegistered(@NotNull final Frame manager) { - this.manager = manager; + public ListenerRegistered(@NotNull final Frame frame) { + this.frame = frame; } @NotNull @Override public Frame frame() { - return this.manager; + return this.frame; } } - final class ViewUnregistered implements PipelineContextManager.ViewUnregistered { + final class ViewUnregistered implements PipelineContextFrame.ViewUnregistered { - private final Frame manager; + private final Frame frame; private final Collection unregisteredViews; public ViewUnregistered( - @NotNull final Frame manager, + @NotNull final Frame frame, @NotNull final Collection unregisteredViews ) { - this.manager = manager; + this.frame = frame; this.unregisteredViews = unregisteredViews; } @NotNull @Override public Frame frame() { - return this.manager; + return this.frame; } @NotNull diff --git a/core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextStates.java b/core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextStates.java index 66a4099..9480fe2 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextStates.java +++ b/core/src/main/java/net/infumia/frame/pipeline/context/PipelineContextStates.java @@ -9,24 +9,24 @@ public interface PipelineContextStates { final class Access implements PipelineContextState.Access { - public final Frame manager; + public final Frame frame; private final State state; private final StateValue value; public Access( - @NotNull final Frame manager, + @NotNull final Frame frame, @NotNull final State state, @NotNull final StateValue value ) { - this.manager = manager; + this.frame = frame; this.state = state; this.value = value; } @NotNull @Override - public Frame manager() { - return this.manager; + public Frame frame() { + return this.frame; } @NotNull @@ -44,18 +44,18 @@ public StateValue value() { final class Update implements PipelineContextState.Update { - public final Frame manager; + public final Frame frame; private final State state; private final Object oldValue; private final StateValue value; public Update( - @NotNull final Frame manager, + @NotNull final Frame frame, @NotNull final State state, @Nullable final Object oldValue, @NotNull final StateValue value ) { - this.manager = manager; + this.frame = frame; this.state = state; this.oldValue = oldValue; this.value = value; @@ -63,8 +63,8 @@ public Update( @NotNull @Override - public Frame manager() { - return this.manager; + public Frame frame() { + return this.frame; } @NotNull diff --git a/core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorManagerImpl.java b/core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorFrameImpl.java similarity index 71% rename from core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorManagerImpl.java rename to core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorFrameImpl.java index f859e01..df0b0a2 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorManagerImpl.java +++ b/core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorFrameImpl.java @@ -5,22 +5,22 @@ import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; import net.infumia.frame.Frame; -import net.infumia.frame.pipeline.context.PipelineContextManager; -import net.infumia.frame.pipeline.context.PipelineContextManagers; -import net.infumia.frame.pipeline.holder.PipelineHolderManager; +import net.infumia.frame.pipeline.context.PipelineContextFrame; +import net.infumia.frame.pipeline.context.PipelineContextFrames; +import net.infumia.frame.pipeline.holder.PipelineHolderFrame; import net.infumia.frame.service.ConsumerService; import net.infumia.frame.service.Implementation; import net.infumia.frame.typedkey.TypedKeyStorageImmutableBuilder; import net.infumia.frame.view.View; import org.jetbrains.annotations.NotNull; -public final class PipelineExecutorManagerImpl implements PipelineExecutorManager { +public final class PipelineExecutorFrameImpl implements PipelineExecutorFrame { - private final PipelineHolderManager pipelines = PipelineHolderManager.BASE.createNew(); - private final Frame manager; + private final PipelineHolderFrame pipelines = PipelineHolderFrame.BASE.createNew(); + private final Frame frame; - public PipelineExecutorManagerImpl(@NotNull final Frame manager) { - this.manager = manager; + public PipelineExecutorFrameImpl(@NotNull final Frame frame) { + this.frame = frame; } @NotNull @@ -30,8 +30,8 @@ public CompletableFuture> executeViewCreated( ) { return this.pipelines.viewCreated() .completeWith( - new PipelineContextManagers.ViewCreated( - this.manager, + new PipelineContextFrames.ViewCreated( + this.frame, Collections.unmodifiableCollection(registeredViews) ) ); @@ -45,8 +45,8 @@ public CompletableFuture> executeViewRegistered( ) { return this.pipelines.viewRegistered() .completeWith( - new PipelineContextManagers.ViewRegistered( - this.manager, + new PipelineContextFrames.ViewRegistered( + this.frame, Collections.unmodifiableCollection(registeredViews), instanceConfigurer ) @@ -57,7 +57,7 @@ public CompletableFuture> executeViewRegistered( @Override public CompletableFuture executeListenersRegistered() { return this.pipelines.listenersRegistered() - .completeWith(new PipelineContextManagers.ListenerRegistered(this.manager)); + .completeWith(new PipelineContextFrames.ListenerRegistered(this.frame)); } @NotNull @@ -67,8 +67,8 @@ public CompletableFuture executeViewUnregistered( ) { return this.pipelines.viewUnregistered() .completeWith( - new PipelineContextManagers.ViewUnregistered( - this.manager, + new PipelineContextFrames.ViewUnregistered( + this.frame, Collections.unmodifiableCollection(unregisteredViews) ) ); @@ -77,7 +77,7 @@ public CompletableFuture executeViewUnregistered( @Override public void applyViewCreated( @NotNull final Implementation< - PipelineContextManager.ViewCreated, + PipelineContextFrame.ViewCreated, Collection > implementation ) { @@ -87,7 +87,7 @@ public void applyViewCreated( @Override public void applyViewRegistered( @NotNull final Implementation< - PipelineContextManager.ViewRegistered, + PipelineContextFrame.ViewRegistered, Collection > implementation ) { @@ -97,7 +97,7 @@ public void applyViewRegistered( @Override public void applyListenersRegistered( @NotNull final Implementation< - PipelineContextManager.ListenerRegistered, + PipelineContextFrame.ListenerRegistered, ConsumerService.State > implementation ) { @@ -107,7 +107,7 @@ public void applyListenersRegistered( @Override public void applyViewUnregistered( @NotNull final Implementation< - PipelineContextManager.ViewUnregistered, + PipelineContextFrame.ViewUnregistered, ConsumerService.State > implementation ) { diff --git a/core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorStateImpl.java b/core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorStateImpl.java index 09e3ab9..d311b00 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorStateImpl.java +++ b/core/src/main/java/net/infumia/frame/pipeline/executor/PipelineExecutorStateImpl.java @@ -28,7 +28,7 @@ public CompletableFuture executeAccess( @NotNull final StateValue value ) { return this.pipelines.access() - .completeWith(new PipelineContextStates.Access(this.context.manager(), state, value)); + .completeWith(new PipelineContextStates.Access(this.context.frame(), state, value)); } @NotNull @@ -40,7 +40,7 @@ public CompletableFuture executeUpdate( ) { return this.pipelines.update() .completeWith( - new PipelineContextStates.Update(this.context.manager(), state, oldValue, value) + new PipelineContextStates.Update(this.context.frame(), state, oldValue, value) ); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/holder/PipelineHolderFrame.java b/core/src/main/java/net/infumia/frame/pipeline/holder/PipelineHolderFrame.java new file mode 100644 index 0000000..e88f607 --- /dev/null +++ b/core/src/main/java/net/infumia/frame/pipeline/holder/PipelineHolderFrame.java @@ -0,0 +1,96 @@ +package net.infumia.frame.pipeline.holder; + +import io.leangen.geantyref.TypeToken; +import java.util.Collection; +import net.infumia.frame.pipeline.Pipeline; +import net.infumia.frame.pipeline.PipelineConsumer; +import net.infumia.frame.pipeline.PipelineConsumerImpl; +import net.infumia.frame.pipeline.PipelineImpl; +import net.infumia.frame.pipeline.PipelineService; +import net.infumia.frame.pipeline.PipelineServiceConsumer; +import net.infumia.frame.pipeline.context.PipelineContextFrame; +import net.infumia.frame.pipeline.service.frame.ServiceListenerRegistered; +import net.infumia.frame.pipeline.service.frame.ServiceListenerRegisteredLogging; +import net.infumia.frame.pipeline.service.frame.ServiceViewCreated; +import net.infumia.frame.pipeline.service.frame.ServiceViewRegistered; +import net.infumia.frame.pipeline.service.frame.ServiceViewUnregisteredLogging; +import net.infumia.frame.view.View; +import org.jetbrains.annotations.NotNull; + +public final class PipelineHolderFrame { + + private final Pipeline> viewCreated; + private final Pipeline> viewRegistered; + private final PipelineConsumer listenersRegistered; + private final PipelineConsumer viewUnregistered; + + public static final PipelineHolderFrame BASE = new PipelineHolderFrame( + new PipelineImpl<>( + new TypeToken< + PipelineService> + >() {}, + ServiceViewCreated.INSTANCE + ), + new PipelineImpl<>( + new TypeToken< + PipelineService> + >() {}, + ServiceViewRegistered.INSTANCE + ), + new PipelineConsumerImpl<>( + new TypeToken>() {}, + ServiceListenerRegisteredLogging.INSTANCE + ).register(ServiceListenerRegistered.INSTANCE), + new PipelineConsumerImpl<>( + new TypeToken>() {}, + ServiceViewUnregisteredLogging.INSTANCE + ) + ); + + @NotNull + public Pipeline> viewCreated() { + return this.viewCreated; + } + + @NotNull + public Pipeline> viewRegistered() { + return this.viewRegistered; + } + + @NotNull + public PipelineConsumer listenersRegistered() { + return this.listenersRegistered; + } + + @NotNull + public PipelineConsumer viewUnregistered() { + return this.viewUnregistered; + } + + @NotNull + public PipelineHolderFrame createNew() { + return new PipelineHolderFrame( + this.viewCreated, + this.viewRegistered, + this.listenersRegistered, + this.viewUnregistered + ); + } + + public PipelineHolderFrame( + @NotNull final Pipeline> viewCreated, + @NotNull final Pipeline< + PipelineContextFrame.ViewRegistered, + Collection + > viewRegistered, + @NotNull final PipelineConsumer< + PipelineContextFrame.ListenerRegistered + > listenersRegistered, + @NotNull final PipelineConsumer viewUnregistered + ) { + this.viewCreated = viewCreated; + this.viewRegistered = viewRegistered; + this.listenersRegistered = listenersRegistered; + this.viewUnregistered = viewUnregistered; + } +} diff --git a/core/src/main/java/net/infumia/frame/pipeline/holder/PipelineHolderManager.java b/core/src/main/java/net/infumia/frame/pipeline/holder/PipelineHolderManager.java deleted file mode 100644 index fb98e47..0000000 --- a/core/src/main/java/net/infumia/frame/pipeline/holder/PipelineHolderManager.java +++ /dev/null @@ -1,96 +0,0 @@ -package net.infumia.frame.pipeline.holder; - -import io.leangen.geantyref.TypeToken; -import java.util.Collection; -import net.infumia.frame.pipeline.Pipeline; -import net.infumia.frame.pipeline.PipelineConsumer; -import net.infumia.frame.pipeline.PipelineConsumerImpl; -import net.infumia.frame.pipeline.PipelineImpl; -import net.infumia.frame.pipeline.PipelineService; -import net.infumia.frame.pipeline.PipelineServiceConsumer; -import net.infumia.frame.pipeline.context.PipelineContextManager; -import net.infumia.frame.pipeline.service.manager.ServiceListenerRegistered; -import net.infumia.frame.pipeline.service.manager.ServiceListenerRegisteredLogging; -import net.infumia.frame.pipeline.service.manager.ServiceViewCreated; -import net.infumia.frame.pipeline.service.manager.ServiceViewRegistered; -import net.infumia.frame.pipeline.service.manager.ServiceViewUnregisteredLogging; -import net.infumia.frame.view.View; -import org.jetbrains.annotations.NotNull; - -public final class PipelineHolderManager { - - private final Pipeline> viewCreated; - private final Pipeline> viewRegistered; - private final PipelineConsumer listenersRegistered; - private final PipelineConsumer viewUnregistered; - - public static final PipelineHolderManager BASE = new PipelineHolderManager( - new PipelineImpl<>( - new TypeToken< - PipelineService> - >() {}, - ServiceViewCreated.INSTANCE - ), - new PipelineImpl<>( - new TypeToken< - PipelineService> - >() {}, - ServiceViewRegistered.INSTANCE - ), - new PipelineConsumerImpl<>( - new TypeToken>() {}, - ServiceListenerRegisteredLogging.INSTANCE - ).register(ServiceListenerRegistered.INSTANCE), - new PipelineConsumerImpl<>( - new TypeToken>() {}, - ServiceViewUnregisteredLogging.INSTANCE - ) - ); - - @NotNull - public Pipeline> viewCreated() { - return this.viewCreated; - } - - @NotNull - public Pipeline> viewRegistered() { - return this.viewRegistered; - } - - @NotNull - public PipelineConsumer listenersRegistered() { - return this.listenersRegistered; - } - - @NotNull - public PipelineConsumer viewUnregistered() { - return this.viewUnregistered; - } - - @NotNull - public PipelineHolderManager createNew() { - return new PipelineHolderManager( - this.viewCreated, - this.viewRegistered, - this.listenersRegistered, - this.viewUnregistered - ); - } - - public PipelineHolderManager( - @NotNull final Pipeline> viewCreated, - @NotNull final Pipeline< - PipelineContextManager.ViewRegistered, - Collection - > viewRegistered, - @NotNull final PipelineConsumer< - PipelineContextManager.ListenerRegistered - > listenersRegistered, - @NotNull final PipelineConsumer viewUnregistered - ) { - this.viewCreated = viewCreated; - this.viewRegistered = viewRegistered; - this.listenersRegistered = listenersRegistered; - this.viewUnregistered = viewUnregistered; - } -} diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceClearLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceClearLogging.java index 780f763..a4f3148 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceClearLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceClearLogging.java @@ -24,7 +24,7 @@ public void accept(@NotNull final PipelineContextElement.Clear ctx) { final ContextElementClear context = ctx.context(); final String key = ((ElementRich) context.element()).key(); // TODO: portlek, Add more detailed message. - context.manager().logger().debug("Element '%s' is cleared.", key == null ? "null" : key); + context.frame().logger().debug("Element '%s' is cleared.", key == null ? "null" : key); } private ServiceClearLogging() {} diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceClickLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceClickLogging.java index b52bf5f..54824d9 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceClickLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceClickLogging.java @@ -24,7 +24,7 @@ public void accept(@NotNull final PipelineContextElement.Click ctx) { final ContextElementClick context = ctx.context(); final String key = ((ElementRich) context.element()).key(); // TODO: portlek, Add more detailed message. - context.manager().logger().debug("Element '%s' is clicked.", key == null ? "null" : key); + context.frame().logger().debug("Element '%s' is clicked.", key == null ? "null" : key); } private ServiceClickLogging() {} diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceRenderLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceRenderLogging.java index 6e14fc2..9108357 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceRenderLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceRenderLogging.java @@ -24,7 +24,7 @@ public void accept(@NotNull final PipelineContextElement.Render ctx) { final ContextElementRender context = ctx.context(); final String key = ((ElementRich) context.element()).key(); // TODO: portlek, Add more detailed message. - context.manager().logger().debug("Element '%s' is rendered.", key == null ? "null" : key); + context.frame().logger().debug("Element '%s' is rendered.", key == null ? "null" : key); } private ServiceRenderLogging() {} diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceUpdateLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceUpdateLogging.java index fb61d94..9a8b8fc 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceUpdateLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/element/ServiceUpdateLogging.java @@ -24,7 +24,7 @@ public void accept(@NotNull final PipelineContextElement.Update ctx) { final ContextElementUpdate context = ctx.context(); final String key = ((ElementRich) context.element()).key(); // TODO: portlek, Add more detailed message. - context.manager().logger().debug("Element '%s' is updated.", key == null ? "null" : key); + context.frame().logger().debug("Element '%s' is updated.", key == null ? "null" : key); } private ServiceUpdateLogging() {} diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceListenerRegistered.java b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceListenerRegistered.java similarity index 61% rename from core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceListenerRegistered.java rename to core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceListenerRegistered.java index ba97e88..497f7e4 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceListenerRegistered.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceListenerRegistered.java @@ -1,15 +1,15 @@ -package net.infumia.frame.pipeline.service.manager; +package net.infumia.frame.pipeline.service.frame; import net.infumia.frame.FrameRich; import net.infumia.frame.pipeline.PipelineServiceConsumer; -import net.infumia.frame.pipeline.context.PipelineContextManager; +import net.infumia.frame.pipeline.context.PipelineContextFrame; import org.jetbrains.annotations.NotNull; public final class ServiceListenerRegistered - implements PipelineServiceConsumer { + implements PipelineServiceConsumer { public static final PipelineServiceConsumer< - PipelineContextManager.ListenerRegistered + PipelineContextFrame.ListenerRegistered > INSTANCE = new ServiceListenerRegistered(); public static final String KEY = "register"; @@ -20,7 +20,7 @@ public String key() { } @Override - public void accept(@NotNull final PipelineContextManager.ListenerRegistered ctx) { + public void accept(@NotNull final PipelineContextFrame.ListenerRegistered ctx) { ((FrameRich) ctx.frame()).listener().register(); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceListenerRegisteredLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceListenerRegisteredLogging.java similarity index 62% rename from core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceListenerRegisteredLogging.java rename to core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceListenerRegisteredLogging.java index f5ace50..d1424ed 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceListenerRegisteredLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceListenerRegisteredLogging.java @@ -1,14 +1,14 @@ -package net.infumia.frame.pipeline.service.manager; +package net.infumia.frame.pipeline.service.frame; import net.infumia.frame.pipeline.PipelineServiceConsumer; -import net.infumia.frame.pipeline.context.PipelineContextManager; +import net.infumia.frame.pipeline.context.PipelineContextFrame; import org.jetbrains.annotations.NotNull; public final class ServiceListenerRegisteredLogging - implements PipelineServiceConsumer { + implements PipelineServiceConsumer { public static final PipelineServiceConsumer< - PipelineContextManager.ListenerRegistered + PipelineContextFrame.ListenerRegistered > INSTANCE = new ServiceListenerRegisteredLogging(); public static final String KEY = "logging"; @@ -19,7 +19,7 @@ public String key() { } @Override - public void accept(@NotNull final PipelineContextManager.ListenerRegistered ctx) { + public void accept(@NotNull final PipelineContextFrame.ListenerRegistered ctx) { ctx.frame().logger().debug("All the listeners are registered!"); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceViewCreated.java b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceViewCreated.java similarity index 80% rename from core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceViewCreated.java rename to core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceViewCreated.java index a3a9872..89e8efa 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceViewCreated.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceViewCreated.java @@ -1,18 +1,18 @@ -package net.infumia.frame.pipeline.service.manager; +package net.infumia.frame.pipeline.service.frame; import java.util.Arrays; import java.util.Collection; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; import net.infumia.frame.pipeline.PipelineService; -import net.infumia.frame.pipeline.context.PipelineContextManager; +import net.infumia.frame.pipeline.context.PipelineContextFrame; import org.jetbrains.annotations.NotNull; public final class ServiceViewCreated - implements PipelineService> { + implements PipelineService> { public static final PipelineService< - PipelineContextManager.ViewCreated, + PipelineContextFrame.ViewCreated, Collection > INSTANCE = new ServiceViewCreated(); @@ -27,7 +27,7 @@ public String key() { @Override @SuppressWarnings("unchecked") public CompletableFuture> handle( - @NotNull final PipelineContextManager.ViewCreated ctx + @NotNull final PipelineContextFrame.ViewCreated ctx ) { final CompletableFuture[] created = ctx .registeredViews() diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceViewRegistered.java b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceViewRegistered.java similarity index 88% rename from core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceViewRegistered.java rename to core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceViewRegistered.java index 6ae8a08..69db4b8 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceViewRegistered.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceViewRegistered.java @@ -1,4 +1,4 @@ -package net.infumia.frame.pipeline.service.manager; +package net.infumia.frame.pipeline.service.frame; import java.util.Arrays; import java.util.Collection; @@ -10,7 +10,7 @@ import net.infumia.frame.context.ContextImpl; import net.infumia.frame.context.view.ContextInitImpl; import net.infumia.frame.pipeline.PipelineService; -import net.infumia.frame.pipeline.context.PipelineContextManager; +import net.infumia.frame.pipeline.context.PipelineContextFrame; import net.infumia.frame.state.StateRegistry; import net.infumia.frame.typedkey.TypedKeyStorage; import net.infumia.frame.typedkey.TypedKeyStorageImmutableBuilder; @@ -20,10 +20,10 @@ import org.jetbrains.annotations.NotNull; public final class ServiceViewRegistered - implements PipelineService> { + implements PipelineService> { public static final PipelineService< - PipelineContextManager.ViewRegistered, + PipelineContextFrame.ViewRegistered, Collection > INSTANCE = new ServiceViewRegistered(); @@ -38,7 +38,7 @@ public String key() { @Override @SuppressWarnings("unchecked") public CompletableFuture> handle( - @NotNull final PipelineContextManager.ViewRegistered ctx + @NotNull final PipelineContextFrame.ViewRegistered ctx ) { final Frame frame = ctx.frame(); final CompletableFuture[] futures = ctx diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceViewUnregisteredLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceViewUnregisteredLogging.java similarity index 57% rename from core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceViewUnregisteredLogging.java rename to core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceViewUnregisteredLogging.java index 0a45a51..795bafe 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/manager/ServiceViewUnregisteredLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/frame/ServiceViewUnregisteredLogging.java @@ -1,13 +1,13 @@ -package net.infumia.frame.pipeline.service.manager; +package net.infumia.frame.pipeline.service.frame; import net.infumia.frame.pipeline.PipelineServiceConsumer; -import net.infumia.frame.pipeline.context.PipelineContextManager; +import net.infumia.frame.pipeline.context.PipelineContextFrame; import org.jetbrains.annotations.NotNull; public final class ServiceViewUnregisteredLogging - implements PipelineServiceConsumer { + implements PipelineServiceConsumer { - public static final PipelineServiceConsumer INSTANCE = + public static final PipelineServiceConsumer INSTANCE = new ServiceViewUnregisteredLogging(); public static final String KEY = "logging"; @@ -18,7 +18,7 @@ public String key() { } @Override - public void accept(@NotNull final PipelineContextManager.ViewUnregistered ctx) { + public void accept(@NotNull final PipelineContextFrame.ViewUnregistered ctx) { ctx.frame().logger().debug("View classes are unregistered '%s'", ctx.unregisteredViews()); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceFirstRenderLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceFirstRenderLogging.java index 7a4e0c5..87bc704 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceFirstRenderLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceFirstRenderLogging.java @@ -21,7 +21,7 @@ public String key() { public void accept(@NotNull final PipelineContextRender.FirstRender ctx) { ctx .context() - .manager() + .frame() .logger() .debug( "onFirstRender ran successfully for view '%s'.", diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceFirstRenderWatchState.java b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceFirstRenderWatchState.java index a5bc3d5..0b7f489 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceFirstRenderWatchState.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceFirstRenderWatchState.java @@ -57,7 +57,7 @@ private static void updateOnStateAccess( state.watchAccess(context, update -> CompletableFutureExtensions.logError( element.pipelines().executeUpdate(context, false), - context.manager().logger(), + context.frame().logger(), "An error occurred while updating element '%s' due to state '%s' access!", element.key(), state @@ -78,7 +78,7 @@ private static void updateOnStateChange( state.watchUpdate(context, update -> CompletableFutureExtensions.logError( element.pipelines().executeUpdate(context, false), - context.manager().logger(), + context.frame().logger(), "An error occurred while updating element '%s' due to state '%s' change!", element.key(), state diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceOpenContainerLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceOpenContainerLogging.java index 75e2e10..c078279 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceOpenContainerLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceOpenContainerLogging.java @@ -20,7 +20,7 @@ public String key() { @Override public void accept(@NotNull final PipelineContextRender.OpenContainer ctx) { // TODO: portlek, More detailed message. - ctx.context().manager().logger().debug("Container opened for viewers '%s'.", ctx.viewers()); + ctx.context().frame().logger().debug("Container opened for viewers '%s'.", ctx.viewers()); } private ServiceOpenContainerLogging() {} diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceResumeLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceResumeLogging.java index faabed9..58437e7 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceResumeLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceResumeLogging.java @@ -23,7 +23,7 @@ public void accept(@NotNull final PipelineContextRender.Resume ctx) { // TODO: portlek, More detailed message. final ContextResume context = ctx.context(); context - .manager() + .frame() .logger() .debug( "Viewers '%s' resumed from view '%s'.", diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdate.java b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdate.java index 0e1c771..8c928d9 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdate.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdate.java @@ -30,15 +30,15 @@ public void accept(@NotNull final PipelineContextRender.StartUpdate ctx) { "Update interval cannot be null in start-update service!" ); - final Frame manager = context.manager(); + final Frame frame = context.frame(); context.updateTask( - manager + frame .taskFactory() .sync( () -> CompletableFutureExtensions.logError( context.pipelines().executeUpdate(), - manager.logger(), + frame.logger(), "An error occurred while running the update task of view '%s'.", context.view().instance() ), diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdateInvalidate.java b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdateInvalidate.java index 7f69aa0..685b97f 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdateInvalidate.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdateInvalidate.java @@ -33,7 +33,7 @@ public void accept(@NotNull final PipelineContextRender.StartUpdate ctx) { context.updateTask(null); } catch (final Throwable e) { context - .manager() + .frame() .logger() .error( e, diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdateLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdateLogging.java index ff473ce..09c8de4 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdateLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStartUpdateLogging.java @@ -22,7 +22,7 @@ public void accept(@NotNull final PipelineContextRender.StartUpdate ctx) { // TODO: portlek, More detailed message. ctx .context() - .manager() + .frame() .logger() .debug("Update task started for view '%s'.", ctx.context().view().instance()); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStopUpdateLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStopUpdateLogging.java index 1e0cf11..d4754c4 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStopUpdateLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceStopUpdateLogging.java @@ -22,7 +22,7 @@ public void accept(@NotNull final PipelineContextRender.StopUpdate ctx) { // TODO: portlek, More detailed message. ctx .context() - .manager() + .frame() .logger() .debug("Update task stopped for view '%s'.", ctx.context().view().instance()); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceUpdateLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceUpdateLogging.java index 9d11033..4346433 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceUpdateLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/render/ServiceUpdateLogging.java @@ -22,7 +22,7 @@ public void accept(@NotNull final PipelineContextRender.Update ctx) { // TODO: portlek, More detailed message. ctx .context() - .manager() + .frame() .logger() .debug("View '%s' updated.", ctx.context().view().instance()); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/state/ServiceAccessLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/state/ServiceAccessLogging.java index 5f3b2c8..24dfda4 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/state/ServiceAccessLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/state/ServiceAccessLogging.java @@ -21,7 +21,7 @@ public String key() { public void accept(@NotNull final PipelineContextState.Access ctx) { final Object value = ctx.value().value(); ctx - .manager() + .frame() .logger() .debug( "State '%s' has been accessed for value '%s'.", diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/state/ServiceUpdateLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/state/ServiceUpdateLogging.java index 21886c8..f272de9 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/state/ServiceUpdateLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/state/ServiceUpdateLogging.java @@ -22,7 +22,7 @@ public void accept(@NotNull final PipelineContextState.Update ctx) { final Object oldValue = ctx.oldValue(); final Object newValue = ctx.value().value(); ctx - .manager() + .frame() .logger() .debug( "State '%s' has been updated from '%s' to '%s'.", diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceClickInteractionDelay.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceClickInteractionDelay.java index 28f668f..eba29be 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceClickInteractionDelay.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceClickInteractionDelay.java @@ -50,7 +50,7 @@ public void accept(@NotNull final PipelineContextView.Click ctx) { lastInteractions.put(key, now); } else { context - .manager() + .frame() .logger() .debug("Click event of viewer '%s' cancelled due to interaction delay.", clicker); ctx.cancelled(true); diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceClickLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceClickLogging.java index af06747..88a59a1 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceClickLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceClickLogging.java @@ -23,7 +23,7 @@ public void accept(@NotNull final PipelineContextView.Click ctx) { // TODO: portlek, More detailed message. final ContextClick context = ctx.context(); context - .manager() + .frame() .logger() .debug( "Player '%s' clicked on view '%s'.", diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCloseCancel.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCloseCancel.java index fec452e..c0459f9 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCloseCancel.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCloseCancel.java @@ -34,7 +34,7 @@ public void accept(@NotNull final PipelineContextView.Close ctx) { return; } ctx.cancelled(true); - context.manager().taskFactory().sync(() -> viewer.open(context.container())); + context.frame().taskFactory().sync(() -> viewer.open(context.container())); final Player player = viewer.player(); final ItemStack cursor = player.getItemOnCursor(); if (cursor != null && cursor.getType() != Material.AIR) { diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCloseLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCloseLogging.java index 89e7930..98679d1 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCloseLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCloseLogging.java @@ -22,7 +22,7 @@ public String key() { public void accept(@NotNull final PipelineContextView.Close ctx) { final ContextClose context = ctx.context(); context - .manager() + .frame() .logger() .debug( "View '%s' closed for viewer '%s'.", diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCreateContainer.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCreateContainer.java index d81a846..932c3d0 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCreateContainer.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCreateContainer.java @@ -64,7 +64,7 @@ public CompletableFuture handle( return CompletableFuture.completedFuture( new ViewContainerImpl( context - .manager() + .frame() .inventoryCreator() .create( instance instanceof InventoryHolder ? (InventoryHolder) instance : null, diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCreateViewers.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCreateViewers.java index 7597218..79abc95 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCreateViewers.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceCreateViewers.java @@ -31,7 +31,7 @@ public CompletableFuture> handle( @NotNull final PipelineContextView.CreateViewers ctx ) { final View view = ctx.view(); - final ViewerCreator viewerCreator = view.context().manager().viewerCreator(); + final ViewerCreator viewerCreator = view.context().frame().viewerCreator(); return CompletableFuture.completedFuture( ctx .viewers() diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceInitLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceInitLogging.java index fdf870a..61ae96f 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceInitLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceInitLogging.java @@ -21,7 +21,7 @@ public void accept(@NotNull final PipelineContextView.Init ctx) { ctx .view() .context() - .manager() + .frame() .logger() .debug("onInit ran successfully for view '%s'.", ctx.view().instance()); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceLayoutResolutionLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceLayoutResolutionLogging.java index 51387bd..e9073a4 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceLayoutResolutionLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceLayoutResolutionLogging.java @@ -19,7 +19,7 @@ public String key() { @Override public void accept(@NotNull final PipelineContextView.LayoutResolution ctx) { - ctx.context().manager().logger().debug("Layout '%s' resolved.", ctx.layouts()); + ctx.context().frame().logger().debug("Layout '%s' resolved.", ctx.layouts()); } private ServiceLayoutResolutionLogging() {} diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceModifyContainerLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceModifyContainerLogging.java index 7ac1678..8caf476 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceModifyContainerLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceModifyContainerLogging.java @@ -19,7 +19,7 @@ public String key() { @Override public void accept(@NotNull final PipelineContextView.ModifyContainer ctx) { - ctx.context().manager().logger().debug("View container successfully modified."); + ctx.context().frame().logger().debug("View container successfully modified."); } private ServiceModifyContainerLogging() {} diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceOpenLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceOpenLogging.java index 95daa2e..b4a8034 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceOpenLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceOpenLogging.java @@ -21,7 +21,7 @@ public String key() { public void accept(@NotNull final PipelineContextView.Open ctx) { final ContextOpen context = ctx.context(); context - .manager() + .frame() .logger() .debug("View '%s' is opening for players '%s'", context.view(), context.viewers()); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceProcessConfigModifierAddSizeModifier.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceProcessConfigModifierAddSizeModifier.java index ff789d5..8b87bcf 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceProcessConfigModifierAddSizeModifier.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceProcessConfigModifierAddSizeModifier.java @@ -42,7 +42,7 @@ public void accept(@NotNull final PipelineContextView.ProcessConfigModifier ctx) size ); context - .manager() + .frame() .logger() .debug( "View's '%s' size modified according to the layout length '%s'.", diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceProcessConfigModifierLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceProcessConfigModifierLogging.java index 23271ee..6874a96 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceProcessConfigModifierLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceProcessConfigModifierLogging.java @@ -20,7 +20,7 @@ public String key() { @Override public void accept(@NotNull final PipelineContextView.ProcessConfigModifier ctx) { - ctx.context().manager().logger().debug("Config modifiers are proceed."); + ctx.context().frame().logger().debug("Config modifiers are proceed."); } private ServiceProcessConfigModifierLogging() {} diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceTransitionLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceTransitionLogging.java index 972c9c9..b791a71 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceTransitionLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/view/ServiceTransitionLogging.java @@ -33,7 +33,7 @@ public void accept(@NotNull final PipelineContextView.Transition ctx) { continue; } context - .manager() + .frame() .logger() .debug( "Player '%s' is transitioning from view '%s' to view '%s'.", diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/viewer/ServiceAddedLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/viewer/ServiceAddedLogging.java index 3a234de..3a6a5da 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/viewer/ServiceAddedLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/viewer/ServiceAddedLogging.java @@ -24,7 +24,7 @@ public void accept(@NotNull final PipelineContextViewer.Added ctx) { final ContextRender context = ctx.context(); for (final Viewer viewer : ctx.viewers()) { context - .manager() + .frame() .logger() .debug("Viewer '%s' added to view '%s'.", viewer, context.view().instance()); } diff --git a/core/src/main/java/net/infumia/frame/pipeline/service/viewer/ServiceRemovedLogging.java b/core/src/main/java/net/infumia/frame/pipeline/service/viewer/ServiceRemovedLogging.java index f1a2cbb..36c1bad 100644 --- a/core/src/main/java/net/infumia/frame/pipeline/service/viewer/ServiceRemovedLogging.java +++ b/core/src/main/java/net/infumia/frame/pipeline/service/viewer/ServiceRemovedLogging.java @@ -24,7 +24,7 @@ public void accept(@NotNull final PipelineContextViewer.Removed ctx) { final ContextRender context = ctx.context(); for (final Viewer viewer : ctx.viewers()) { context - .manager() + .frame() .logger() .debug("Viewer '%s' removed from view '%s'.", viewer, context.view().instance()); } diff --git a/core/src/main/java/net/infumia/frame/state/value/StateValueHostImpl.java b/core/src/main/java/net/infumia/frame/state/value/StateValueHostImpl.java index 5168500..acd9a30 100644 --- a/core/src/main/java/net/infumia/frame/state/value/StateValueHostImpl.java +++ b/core/src/main/java/net/infumia/frame/state/value/StateValueHostImpl.java @@ -52,7 +52,7 @@ public StateValue accessStateValueOrInitialize(@NotNull final StateRich StateValue accessStateValue(@NotNull final StateRich state) { final StateValue value = this.values.get(state); if (value == null) { - this.context.manager() + this.context.frame() .logger() .debug("State '%s' not found in '%s'!", state, this.values); return null; @@ -69,7 +69,7 @@ public StateValue updateStateValue( ) { final StateValue stateValue = this.accessStateValue(state); if (stateValue == null) { - this.context.manager().logger().debug("State '%s' is not registered!", state); + this.context.frame().logger().debug("State '%s' is not registered!", state); return null; } final T oldValue = stateValue.value(); @@ -83,7 +83,7 @@ public StateValue updateStateValue( public StateValue updateStateValue(@NotNull final StateRich state) { final StateValue stateValue = this.accessStateValue(state); if (stateValue == null) { - this.context.manager().logger().debug("State '%s' is not registered!", state); + this.context.frame().logger().debug("State '%s' is not registered!", state); return null; } this.pipelines.executeUpdate(state, stateValue.value(), stateValue); @@ -108,7 +108,7 @@ public CompletableFuture> accessStateValueOrInitializeWait( ) { final StateValue value = this.values.get(state); if (value == null) { - this.context.manager() + this.context.frame() .logger() .debug("State '%s' not found in '%s'!", state, this.values); return CompletableFuture.completedFuture(null); @@ -124,7 +124,7 @@ public CompletableFuture> accessStateValueOrInitializeWait( ) { return this.accessStateValueWait(state).thenCompose(stateValue -> { if (stateValue == null) { - this.context.manager().logger().debug("State '%s' is not registered!", state); + this.context.frame().logger().debug("State '%s' is not registered!", state); return CompletableFuture.completedFuture(null); } final T oldValue = stateValue.value(); @@ -142,7 +142,7 @@ public CompletableFuture> accessStateValueOrInitializeWait( ) { return this.accessStateValueWait(state).thenCompose(stateValue -> { if (stateValue == null) { - this.context.manager().logger().debug("State '%s' is not registered!", state); + this.context.frame().logger().debug("State '%s' is not registered!", state); return CompletableFuture.completedFuture(null); } return this.pipelines.executeUpdate( @@ -216,7 +216,7 @@ public void initializeState( @NotNull final StateValue value ) { this.values.put((StateRich) state, (StateValue) value); - this.context.manager() + this.context.frame() .logger() .debug("State '%s' initialized with value '%s'", state, value); }