blob: 508841de811a1e411416e4a20ea4717e9942e4f5 (
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/*******************************************************************************
* Copyright (c) 2007 Versant Corp.
* 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:
* Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
******************************************************************************/
package org.eclipse.ecf.discovery.identity;
import org.eclipse.ecf.core.identity.ID;
/**
* Service type ID contract.
*
*/
public interface IServiceTypeID extends ID {
/**
* Default ECF protocols (will be translated into provider specific representation)
* @since 3.0
*/
public static final String[] DEFAULT_PROTO = new String[] {"tcp"}; //$NON-NLS-1$
/**
* Default ECF scopes (will be translated into provider specific representation)
* @since 3.0
*/
public static final String[] DEFAULT_SCOPE = new String[] {"default"}; //$NON-NLS-1$
/**
* Default ECF naming authority (will be translated into provider specific representation)
* @since 3.0
*/
public static final String DEFAULT_NA = "iana"; //$NON-NLS-1$
/*
* jSLP => getServices()[0]:getServices()[1][.getNamingAuthoriy():getService()[n]
* jmDNS => _getServices()[0]._getServices()[n]._getProtocol()[0]._getScopes()[0]
*/
/*
* jSLP => naming authority (IANA or custom)
* jmDNS => IANA
*/
/**
* @return String Naming Authority for this ServiceType. Will not be <code>null</code>.
* If this instance has been created with the provider specific default, this will return
* {@link IServiceTypeID#DEFAULT_NA} instead.
*/
public String getNamingAuthority();
/*
* jSLP => unknown (0) only known at the service consumer level
* jmDNS => protocols (udp/ip or tcp/ip or both) (1)
*/
/**
* @return String[] of protocols supported. Will not be <code>null</code>, but may
* be empty array.
* If this instance has been created with the provider specific default, this will return
* {@link IServiceTypeID#DEFAULT_PROTO} instead.
*/
public String[] getProtocols();
/*
* jSLP => Scopes (n)
* jmDNS => domain (1)
*/
/**
* @return The scopes in which this Service is registered. Will not be <code>null</code>, but may
* be empty array.
* If this instance has been created with the provider specific default, this will return
* {@link IServiceTypeID#DEFAULT_SCOPE} instead!
*/
public String[] getScopes();
/*
* jSLP => abstract and concrete types (n)
* jmDNS => everything before port (n)
*/
/**
* @return The name of the service type. If the underlying discovery mechanism
* supports naming hierarchies, the hierarchy will be returned
* flattened as an array. Will not be <code>null</code>, but may
* be empty array.
*/
public String[] getServices();
/**
* Get the internal name of the service type. Provider implementations may choose
* to have this return the same value as {@link ID#getName()}, or they may return
* a different, internal value appropriate to the provider.
*
* @return String internal name for this service type. Will not return <code>null</code>.
*/
public String getInternal();
}
|