blob: 49c080d57d292d7d83428a1a0ce0dde35355e04b (
plain) (
blame)
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
60
61
62
63
64
65
66
67
|
/*******************************************************************************
* Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
* Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.tcf.locator.interfaces.services;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
/**
* The service to query asynchronous properties of peer nodes.
*/
public interface IPeerModelQueryService extends IPeerModelService {
/**
* Query the list of available local services for the given peer node.
* <p>
* <b>Note:</b> The result of the query is cached within the given peer
* node and subsequent calls will return immediately with the cached value.
* <p>
* <b>Note:</b> This method must be called outside the TCF dispatch thread.
*
* @param node The peer node. Must not be <code>null</code>.
* @param done The client callback. Must not be <code>null</code>.
*/
public String queryLocalServices(IPeerNode node);
/**
* Query the list of available remote services for the given peer node.
* <p>
* <b>Note:</b> The result of the query is cached within the given peer
* node and subsequent calls will return immediately with the cached value.
* <p>
* <b>Note:</b> This method must be called outside the TCF dispatch thread.
*
* @param node The peer node. Must not be <code>null</code>.
* @param done The client callback. Must not be <code>null</code>.
*/
public String queryRemoteServices(IPeerNode node);
/**
* Client call back interface for queryServicesAsync(...).
*/
public interface DoneQueryServices {
/**
* Called when the services query completed.
*
* @param error The error description if operation failed, <code>null</code> if succeeded.
*/
void doneQueryServices(Throwable error);
}
/**
* Asynchronously query the services for the given peer node.
* <p>
* <b>Note:</b> This method must be called from within the TCF dispatch thread.
*
* @param node The peer node. Must not be <code>null</code>.
* @param done The client callback. Must not be <code>null</code>.
*/
public void queryServicesAsync(IPeerNode node, DoneQueryServices done);
}
|