blob: dde409d94c61687bfe829960130dbd30c05476fb (
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
/****************************************************************************
* Copyright (c) 2007 Composent, Inc. and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* Composent, Inc. - initial API and implementation
*
* SPDX-License-Identifier: EPL-2.0
*****************************************************************************/
package org.eclipse.ecf.discovery.identity;
import org.eclipse.ecf.core.identity.Namespace;
/**
* ServiceID factory contract.
*
* @see ServiceIDFactory
*/
public interface IServiceIDFactory {
/**
* Create an IServiceTypeID. Creates an immutable IServiceTypeID.
*
* @param namespace
* the Namespace instance to create the service ID with. Must not
* be <code>null</code>.
* @param serviceType
* The service type. Must not be <code>null</code>.
* @since 3.0
*
* @return IServiceTypeID created. Will not be <code>null</code>.
*/
public IServiceTypeID createServiceTypeID(Namespace namespace,
String serviceType);
/**
* Create an IServiceTypeID. Creates an immutable IServiceTypeID.
*
* @param namespace
* the Namespace instance to create the service ID with. Must not
* be <code>null</code>.
* @param serviceType
* Array containing the ordered naming hierarchy from 0...n. Must
* not be <code>null</code>.
* @since 3.0
*
* @return IServiceTypeID created. Will not be <code>null</code>.
*/
public IServiceTypeID createServiceTypeID(Namespace namespace,
String[] serviceType);
/**
* Create an IServiceTypeID. Creates an immutable IServiceTypeID.
*
* @param namespace
* the Namespace instance to create the service ID with. Must not
* be <code>null</code>.
* @param services
* Array containing the ordered naming hierarchy from 0...n. Must
* not be <code>null</code>.
* @param scopes
* Array containing all scopes or
* {@link IServiceTypeID#DEFAULT_SCOPE} for default. Must not be
* <code>null</code>.
* @param protocols
* Array containing all protocols or
* {@link IServiceTypeID#DEFAULT_PROTO} for default. Must not be
* <code>null</code>.
* @param namingAuthority
* the NamingAuthority or {@link IServiceTypeID#DEFAULT_NA} for
* default. Must not be <code>null</code>.
* @since 3.0
*
* @return IServiceTypeID created. Will not be <code>null</code>.
*/
public IServiceTypeID createServiceTypeID(Namespace namespace,
String[] services, String[] scopes, String[] protocols,
String namingAuthority);
/**
* Create an IServiceTypeID. Creates an immutable IServiceTypeID.
* NamingAuthority will be set to {@link IServiceTypeID#DEFAULT_NA}
*
* @param namespace
* the Namespace instance to create the service ID with. Must not
* be <code>null</code>.
* @param serviceType
* Array containing the ordered naming hierarchy from 0...n. Must
* not be <code>null</code>.
* @param protocols
* Array containing the protocols. Must not be <code>null</code>.
* @since 3.0
*
* @return IServiceTypeID created. Will not be <code>null</code>.
*/
public IServiceTypeID createServiceTypeID(Namespace namespace,
String[] serviceType, String[] protocols);
/**
* Create an IServiceTypeID. Creates an immutable IServiceTypeID from a non-
* <code>null</code> {@link IServiceTypeID} with a different
* {@link Namespace}.
*
* @param namespace
* the Namespace instance to create the service type ID with.
* Must not be <code>null</code>.
* @param aServiceTypeID
* service type id. Must not be <code>null</code>.
* @since 3.0
*
* @return IServiceTypeID created. Will not be <code>null</code>.
*/
public IServiceTypeID createServiceTypeID(Namespace namespace,
IServiceTypeID aServiceTypeID);
}
|