]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.security.core/src/org/argeo/security/SystemExecutionService.java
2 * Copyright (C) 2007-2012 Argeo GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.argeo
.security
;
18 import java
.util
.concurrent
.Callable
;
19 import java
.util
.concurrent
.Executor
;
20 import java
.util
.concurrent
.Future
;
23 * Allows to execute code authenticated as a system user (that is not a real
24 * person). The {@link Executor} interface is not used directly in order to
25 * allow future extension of this interface and to simplify its publication
26 * (e.g. as an OSGi service) and interception.
28 public interface SystemExecutionService
extends Executor
{
30 * Executes this {@link Runnable} within a system authenticated context.
31 * Implementations should make sure that this method is properly secured via
32 * Java permissions since it could access everything without credentials.
34 public void execute(Runnable runnable
);
37 * Executes this {@link Callable} within a system authenticated context.
38 * Implementations should make sure that this method is properly secured via
39 * Java permissions since it could access everything without credentials.
41 public <T
> Future
<T
> submit(Callable
<T
> task
);