Mercurial > hg > orthanc-java
comparison JavaSDK/be/uclouvain/orthanc/Callbacks.java @ 0:3ecef5782f2c
initial commit
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 18 Oct 2023 17:59:44 +0200 |
parents | |
children | 1c407ba1d311 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3ecef5782f2c |
---|---|
1 package be.uclouvain.orthanc; | |
2 | |
3 /** | |
4 * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium | |
5 * SPDX-License-Identifier: GPL-3.0-or-later | |
6 */ | |
7 | |
8 /** | |
9 * Java plugin for Orthanc | |
10 * Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium | |
11 * | |
12 * This program is free software: you can redistribute it and/or | |
13 * modify it under the terms of the GNU General Public License as | |
14 * published by the Free Software Foundation, either version 3 of the | |
15 * License, or (at your option) any later version. | |
16 * | |
17 * This program is distributed in the hope that it will be useful, but | |
18 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
20 * General Public License for more details. | |
21 * | |
22 * You should have received a copy of the GNU General Public License | |
23 * along with this program. If not, see http://www.gnu.org/licenses/. | |
24 **/ | |
25 | |
26 | |
27 import java.util.Map; | |
28 | |
29 /** | |
30 * Wrapper around the callbacks provided by the Orthanc SDK. | |
31 **/ | |
32 public class Callbacks { | |
33 public interface OnChange { | |
34 public void call(ChangeType changeType, | |
35 ResourceType resourceType, | |
36 String resourceId); | |
37 } | |
38 | |
39 public interface OnRestRequest { | |
40 public void call(RestOutput output, | |
41 HttpMethod method, | |
42 String uri, | |
43 String[] regularExpressionGroups, | |
44 Map<String, String> headers, | |
45 Map<String, String> getParameters, | |
46 byte[] body); | |
47 } | |
48 | |
49 public static native void register(OnChange callback); | |
50 | |
51 public static native void register(String pathRegularExpression, | |
52 OnRestRequest callback); | |
53 } |