blob: 81bd5b6152dea7e421a6decc0c8d9432584f8b89 (
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
68
69
70
71
72
73
74
75
|
/*******************************************************************************
* Copyright (c) 2004 Composent, 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: Composent, Inc. - initial API and implementation
******************************************************************************/
package org.eclipse.ecf.discovery;
import java.net.InetAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map;
import org.eclipse.ecf.core.identity.ServiceID;
/**
* Service information. Defines the information associated
* with a service
*
* @author slewis
*
*/
public interface IServiceInfo {
/**
* Get InetAddress for service
* @return InetAddress the address for the service.
* May be null if address is not known.
*/
public InetAddress getAddress();
/**
* Get ServiceID for service.
*
* @return ServiceID the serviceID for the service. Must not be null.
*/
public ServiceID getServiceID();
/**
* The port for the service
*
* @return port
*/
public int getPort();
/**
* The priority for the service
*
* @return int the priority. Zero if no priority information for service.
*/
public int getPriority();
/**
* The weight for the service. Zero if no weight information for service.
*
* @return int the weight
*/
public int getWeight();
/**
* Map with any/all properties associated with the service.
* Properties are assumed to be name/value pairs, both of type String.
*
* @return Map the properties associated with this service
*/
public Map getProperties();
/**
* Returns true if this service info has been resolved by the service
* publisher, false if not.
*
* @return true if this instance has been resolved, false if not
*/
public boolean isResolved();
/**
* Returns URI of service (if available). Throws URISyntaxException if
* existing service info cannot be used to create URI
*/
public URI getServiceURI() throws URISyntaxException;
}
|