Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a032cd4fafa959d06c0372c4733272af879f1a86 (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
package org.eclipse.ecf.provider.mqtt.paho.container;

import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.IDFactory;
import org.eclipse.ecf.core.identity.Namespace;
import org.eclipse.ecf.core.sharedobject.ISharedObjectContainerConfig;
import org.eclipse.ecf.provider.comm.ConnectionCreateException;
import org.eclipse.ecf.provider.comm.ISynchAsynchConnection;
import org.eclipse.ecf.provider.generic.ClientSOContainer;
import org.eclipse.ecf.provider.mqtt.paho.identity.PahoID;
import org.eclipse.ecf.provider.mqtt.paho.identity.PahoNamespace;

public class PahoClientContainer extends ClientSOContainer {

	public PahoClientContainer(ISharedObjectContainerConfig config) {
		super(config);
	}

	@Override
	public Namespace getConnectNamespace() {
		return IDFactory.getDefault().getNamespaceByName(PahoNamespace.NAME);
	}

	@Override
	protected ISynchAsynchConnection createConnection(ID targetID, Object data)
			throws ConnectionCreateException {
		return new PahoConnection((PahoID) targetID,data);
	}

}

Back to the top