-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
ClientServerEventService.java
59 lines (52 loc) · 1.88 KB
/
ClientServerEventService.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Copyright (c) 2012-2017 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/
package org.eclipse.che.ide.api.event.ng;
import org.eclipse.che.api.promises.client.Promise;
/**
* Send file tracking operation calls on server side. There are several types of such calls:
*
* <ul>
* <li>START/STOP - tells to start/stop tracking specific file
* <li>SUSPEND/RESUME - tells to start/stop tracking all files registered for specific endpoint
* <li>MOVE - tells that file that is being tracked should be moved (renamed)
* </ul>
*/
public interface ClientServerEventService {
/**
* Sends event on server side which tells to start tracking specific file
*
* @param path the path to the specific file
*/
Promise<Boolean> sendFileTrackingStartEvent(String path);
/**
* Sends event on server side which tells to stop tracking specific file
*
* @param path the path to the specific file
*/
Promise<Boolean> sendFileTrackingStopEvent(String path);
/**
* Sends event on server side which tells to suspend tracking all files registered for specific
* endpoint
*/
Promise<Boolean> sendFileTrackingSuspendEvent();
/**
* Sends event on server side which tells to resume tracking all files registered for specific
* endpoint
*/
Promise<Boolean> sendFileTrackingResumeEvent();
/**
* Sends event on server side which tells file that is being tracked should be moved (renamed)
*
* @param oldPath the old path to the specific file
* @param newPath the new path to the specific file
*/
Promise<Boolean> sendFileTrackingMoveEvent(String oldPath, String newPath);
}