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 |
/** |
|
23 |
* Klassen, die Java-Objekte in ein anderes Format umwandeln und umgekehrt |
|
24 |
* muessen diese Schnittstelle implementieren |
|
25 |
* |
|
26 |
* @author Copyright (c) Ulrich Hilger, http://uhilger.de |
|
27 |
* @author Published under the terms and conditions of |
|
28 |
* the <a href="http://www.gnu.org/licenses/agpl-3.0" target="_blank">GNU Affero General Public License</a> |
|
29 |
* |
|
30 |
* @version 1, September 16, 2012 |
|
31 |
*/ |
|
32 |
public interface Wandler { |
|
33 |
|
|
34 |
/** |
|
35 |
* Ein Java-Objekt in das Format verwandeln, das dieser Wandler |
|
36 |
* verarbeitet |
|
37 |
* |
|
38 |
* @param obj das Objekt, das verwandelt werden soll |
|
39 |
* @param typ der Datentyp, von dem verwandelt werden soll |
|
40 |
* @return das Objekt, in das das uebergebene Objekt verwandelt wurde |
|
41 |
*/ |
|
42 |
public Object vonJava(Object obj, Class typ); |
|
43 |
|
|
44 |
/** |
|
45 |
* Das Format, das dieser Wandler verarbeitet, zu Java wandeln |
|
46 |
* |
|
47 |
* @param obj das Objekt, das verwandelt werden soll |
|
48 |
* @param typ der Datentyp, in den verwandelt werden soll |
|
49 |
* @return das Objekt, in das das uebergebene Objekt verwandelt wurde |
|
50 |
*/ |
|
51 |
public Object zuJava(Object obj, Class typ); |
|
52 |
|
|
53 |
/** |
|
54 |
* Das Format ermitteln, das dieser Wandler verarbeitet |
|
55 |
* @return das Format, das dieser Wandler verarbeitet |
|
56 |
*/ |
|
57 |
public String getFormat(); |
|
58 |
|
|
59 |
/** |
|
60 |
* Diesen Wandler aufloesen |
|
61 |
*/ |
|
62 |
public void aufloesen(); |
|
63 |
} |