public final class Endpoints extends Object
Modifier and Type | Method and Description |
---|---|
static void |
bind(Endpoint ep,
ServiceBinding serviceBinding) |
static ServiceBinding |
binding(org.eclipse.emf.ecore.EObject service) |
static ServiceBinding |
contain(org.eclipse.emf.ecore.EObject service) |
static Endpoint |
findEndpoint(Node node,
int port) |
static Node |
findNode(Endpoint ep) |
static <N extends Node> |
findNode(Endpoint ep,
Class<N> clazz)
Find the containing node which must be of the provided type
|
protected static String |
makeLabel(ServiceBinding serviceBinding) |
static ServiceBinding |
reference(org.eclipse.emf.ecore.EObject service) |
static Endpoint |
registerEndpoint(Application app,
int port,
ServiceBinding serviceBinding,
String name)
Register a new endpoint
The endpoint must not exists if the binding service is set, but will exists after the call returns |
static Endpoint |
registerEndpoint(Node node,
int port,
ServiceBinding serviceBinding,
String name)
Register a new endpoint
The endpoint must not exists if the binding service is set, but will exists after the call returns |
public static Endpoint registerEndpoint(Application app, int port, ServiceBinding serviceBinding, String name)
public static Endpoint registerEndpoint(Node node, int port, ServiceBinding serviceBinding, String name)
node
- the node to which this endpoint belongsport
- the port numberserviceBinding
- the service that is bound to this endpointname
- an informative nameprotected static String makeLabel(ServiceBinding serviceBinding)
public static ServiceBinding reference(org.eclipse.emf.ecore.EObject service)
public static ServiceBinding contain(org.eclipse.emf.ecore.EObject service)
public static <N extends Node> N findNode(Endpoint ep, Class<N> clazz)
ep
- the endpointclazz
- the node clazzIllegalStateException
- if the endpoint is not contained by the correct node typepublic static void bind(Endpoint ep, ServiceBinding serviceBinding)
public static ServiceBinding binding(org.eclipse.emf.ecore.EObject service)