]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/SystemExecutionService.java
e03f27ab2461455cb7abff01f0b64ae978a95a32
1 package org
.argeo
.security
;
3 import java
.util
.concurrent
.Callable
;
4 import java
.util
.concurrent
.Executor
;
5 import java
.util
.concurrent
.Future
;
8 * Allows to execute code authenticated as a system user (that is not a real
9 * person). The {@link Executor} interface interface is not used directly in
10 * order to allow future extension of this interface and to simplify its
11 * publication (e.g. as an OSGi service) and interception.
13 public interface SystemExecutionService
extends Executor
{
15 * Executes this {@link Runnable} within a system authenticated context.
16 * Implementations should make sure that this method is properly secured via
17 * Java permissions since it could access to everything without credentials.
19 public void execute(Runnable runnable
);
22 * Executes this {@link Callable} within a system authenticated context.
23 * Implementations should make sure that this method is properly secured via
24 * Java permissions since it could access to everything without credentials.
26 public <T
> Future
<T
> submit(Callable
<T
> task
);