use of org.eclipse.ecf.core.identity.IDCreateException in project ecf by eclipse.
the class ServiceIDTest method testServiceIDFactoryNullServices.
/*
* org.eclipse.ecf.discovery.identity.IServiceIDFactory.createServiceID(Namespace, String[], String[], String[], String, String)
*/
public void testServiceIDFactoryNullServices() {
try {
Namespace namespaceByName = IDFactory.getDefault().getNamespaceByName(namespace);
ServiceIDFactory.getDefault().createServiceTypeID(namespaceByName, null, scopes, protocols, namingAuthority);
} catch (IDCreateException e) {
return;
}
fail("Invalid services may cause InvalidIDException");
}
use of org.eclipse.ecf.core.identity.IDCreateException in project ecf by eclipse.
the class NamespaceTest method testNewNamespaceCreateInstance.
public void testNewNamespaceCreateInstance() {
Namespace ns = createNamespace();
try {
ns.createInstance(null);
fail("createInstance did not return null");
} catch (IDCreateException e) {
}
}
use of org.eclipse.ecf.core.identity.IDCreateException in project ecf by eclipse.
the class ServiceRequestor method createSubscriptionDescription.
protected SharedObjectDescription createSubscriptionDescription(ID containerID, ID sharedObjectID, ISubscriptionCallback callback) {
Map props = new HashMap(3);
props.put(SubscriptionAgent.CONTAINER_ID_KEY, containerID);
props.put(SubscriptionAgent.SHARED_OBJECT_ID_KEY, sharedObjectID);
props.put(SubscriptionAgent.CALLBACK_KEY, callback);
ID id;
try {
id = IDFactory.getDefault().createGUID();
} catch (IDCreateException e) {
throw new RuntimeException(e);
}
return new SharedObjectDescription(SubscriptionAgent.class, id, props);
}
use of org.eclipse.ecf.core.identity.IDCreateException in project ecf by eclipse.
the class XMPPChatRoomContainer method connect.
public void connect(String groupName) throws ContainerConnectException {
ID targetID = null;
try {
targetID = createChatRoomID(groupName);
} catch (final IDCreateException e) {
throw new ContainerConnectException(Messages.XMPPChatRoomContainer_EXCEPTION_CREATING_ROOM_ID, e);
}
this.connect(targetID, null);
}
Aggregations