danhaywood commented on a change in pull request #590:
URL: https://github.com/apache/isis/pull/590#discussion_r648485085
##########
File path:
api/applib/src/main/java/org/apache/isis/applib/services/iactnlayer/InteractionService.java
##########
@@ -0,0 +1,102 @@
+package org.apache.isis.applib.services.iactnlayer;
+
+import java.util.concurrent.Callable;
+
+import lombok.NonNull;
+
+/**
+ * A low-level service to programmatically "connect" (or create a
+ * session, or interact with; choose your term) the the framework's runtime.
+ *
+ * <p>
+ * This service is used internally by the framework itself, for example
+ * when a viewer receives a request a new {@link InteractionLayer} is
created
+ * for the duration of the users's interaction. It is also used by
integration
+ * tests, to be able to connect to the database.
+ * </p>
+ *
+ * <p>
+ * You could think of this as analogous to an <code>HttpRequest</code>, or
+ * a JPA <code>EntityManager</code> or JDO <code>PersistenceManager</code>.
+ * </p>
+ *
+ * <p>
+ * There are two main APIs exposed. One is to
+ * {@link #openInteraction(InteractionContext) open} a new {@link
InteractionLayer},
+ * to be {@link #closeInteractionLayers() closed later}. The other is to
+ * execute a {@link Callable} or {@link ThrowingRunnable runnable} within
the
+ * duration of an {@link InteractionLayer}, wrapping up automatically.
+ * This is what is used by {@link
org.apache.isis.applib.services.sudo.SudoService}, for example.
+ * </p>
+ *
+ * @since 2.x {@index}
+ */
+public interface InteractionService {
Review comment:
Agree, I think I intended to do this then forgot. Will add it in.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]