Search in sources :

Example 31 with IDCreateException

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");
}
Also used : IDCreateException(org.eclipse.ecf.core.identity.IDCreateException) Namespace(org.eclipse.ecf.core.identity.Namespace)

Example 32 with IDCreateException

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) {
    }
}
Also used : IDCreateException(org.eclipse.ecf.core.identity.IDCreateException) Namespace(org.eclipse.ecf.core.identity.Namespace)

Example 33 with IDCreateException

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);
}
Also used : SharedObjectDescription(org.eclipse.ecf.core.sharedobject.SharedObjectDescription) HashMap(java.util.HashMap) IDCreateException(org.eclipse.ecf.core.identity.IDCreateException) ID(org.eclipse.ecf.core.identity.ID) Map(java.util.Map) HashMap(java.util.HashMap)

Example 34 with IDCreateException

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);
}
Also used : ContainerConnectException(org.eclipse.ecf.core.ContainerConnectException) IDCreateException(org.eclipse.ecf.core.identity.IDCreateException) XMPPRoomID(org.eclipse.ecf.provider.xmpp.identity.XMPPRoomID) ID(org.eclipse.ecf.core.identity.ID)

Aggregations

IDCreateException (org.eclipse.ecf.core.identity.IDCreateException)34 ID (org.eclipse.ecf.core.identity.ID)16 Matcher (java.util.regex.Matcher)11 Namespace (org.eclipse.ecf.core.identity.Namespace)8 ThreadMessageID (org.eclipse.ecf.internal.provider.phpbb.identity.ThreadMessageID)5 IOException (java.io.IOException)4 LinkedHashMap (java.util.LinkedHashMap)4 ExecutionException (org.eclipse.core.commands.ExecutionException)4 ContainerConnectException (org.eclipse.ecf.core.ContainerConnectException)4 UnknownHostException (java.net.UnknownHostException)3 ContainerConnectedEvent (org.eclipse.ecf.core.events.ContainerConnectedEvent)3 ContainerConnectingEvent (org.eclipse.ecf.core.events.ContainerConnectingEvent)3 ThreadMessageFactory (org.eclipse.ecf.internal.provider.vbulletin.internal.ThreadMessageFactory)3 URI (java.net.URI)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 NameValuePair (org.apache.commons.httpclient.NameValuePair)2 Job (org.eclipse.core.runtime.jobs.Job)2 IBBObject (org.eclipse.ecf.bulletinboard.IBBObject)2 IThreadMessage (org.eclipse.ecf.bulletinboard.IThreadMessage)2