commit | author | age
|
ca8e1e
|
1 |
/* |
U |
2 |
Transit - Remote procedure calls made simple |
|
3 |
Copyright (c) 2012 Ulrich Hilger |
|
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU Affero General Public License as published by |
|
7 |
the Free Software Foundation, either version 3 of the License, or |
|
8 |
(at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU Affero General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU Affero General Public License |
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
18 |
|
|
19 |
package de.uhilger.transit; |
|
20 |
|
|
21 |
/** |
|
22 |
* Soll eine Klasse den Namen des angemeldeten Benutzers kennen, |
|
23 |
* kann sie bei Verwendung von Transit diese Schnittstelle |
|
24 |
* implementieren, um den Namen von Transit automatisch |
|
25 |
* mitgeteilt zu bekommen. |
|
26 |
* |
|
27 |
* Transit sorgt beim dynamischen Laden von Klassen dafuer, dass ihnen |
|
28 |
* ueber diese Schnittstelle der Benutzername uebergeben wird, sofern |
|
29 |
* die betreffende Klasse diese Schnittstelle implementiert. |
|
30 |
* |
|
31 |
* @author Copyright (c) Ulrich Hilger, http://uhilger.de |
|
32 |
* @author Published under the terms and conditions of |
|
33 |
* the <a href="http://www.gnu.org/licenses/agpl-3.0" target="_blank">GNU Affero General Public License</a> |
|
34 |
* |
|
35 |
* @version 1, September 23, 2012 |
|
36 |
*/ |
|
37 |
public interface NutzerKontext { |
|
38 |
|
|
39 |
/** |
|
40 |
* Den Namen des angemeldeten Benutzers ermitteln |
|
41 |
* |
|
42 |
* @return Name des angemeldeten Benutzers oder "anonymous", |
|
43 |
* wenn kein Benutzer angemeldet ist |
|
44 |
*/ |
|
45 |
public String getNutzerId(); |
|
46 |
|
|
47 |
/** |
|
48 |
* Den Namen des angemeldeten Benutzers setzen |
|
49 |
* |
|
50 |
* @param nutzerId Name des angemeldeten Benutzers |
|
51 |
*/ |
|
52 |
public void setNutzerId(String nutzerId); |
|
53 |
|
|
54 |
} |