本文整理汇总了Java中org.eclipse.ecf.core.ContainerCreateException类的典型用法代码示例。如果您正苦于以下问题:Java ContainerCreateException类的具体用法?Java ContainerCreateException怎么用?Java ContainerCreateException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ContainerCreateException类属于org.eclipse.ecf.core包,在下文中一共展示了ContainerCreateException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.eclipse.ecf.core.ContainerCreateException; //导入依赖的package包/类
@ApplicationStarting
public void init() throws GenericServerContainerGroupCreateException, ContainerCreateException, IOException {
BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
endpointListener = new InternalEndPointListener();
Dictionary<String, String> props = new Hashtable<String, String>();
props.put("endpoint.listener.scope","(endpoint.id=*)");
bundleContext.registerService(EndpointListener.class, endpointListener, props);
QCommunicationManager communicationManager = ECFConnectorOSGIFactory.eINSTANCE.createECFCommunicationManager();
bundleContext.registerService(QCommunicationManager.class, communicationManager, null);
/* IGenericServerContainerGroup containerGroup = genericServerFactory.createContainerGroup("192.168.42.34",3797);
ISharedObjectContainer container = containerGroup.createContainer("/server");
System.out.println(container);
containerGroup.startListening();
*/
}
示例2: connect
import org.eclipse.ecf.core.ContainerCreateException; //导入依赖的package包/类
private void connect () throws ContainerCreateException, ContainerConnectException
{
this.container = ContainerFactory.getDefault ().createContainer ( DISCOVERY_CONTAINER, new Object[] { "ecf.discovery.composite.locator" } ); //$NON-NLS-1$
this.advertiser = (IDiscoveryAdvertiser)this.container.getAdapter ( IDiscoveryAdvertiser.class );
if ( this.advertiser != null )
{
this.container.connect ( null, null );
}
}
示例3: MyWebSocketHandler
import org.eclipse.ecf.core.ContainerCreateException; //导入依赖的package包/类
public MyWebSocketHandler() {
super();
IContainerManager icm = getContainerManagerService();
ID id = IDFactory.getDefault().createStringID(WebSocketServerSOContainer.getDefaultServerURL());
IContainer container = icm.getContainer(id);
try {
if (container == null)
container = icm.getContainerFactory().createContainer(WebSocketGenericContainerInstantiator.SERVER_NAME, new Object[] {id});
} catch (ContainerCreateException e) {
System.out.println(e);
}
serverSOContainer = (WebSocketServerSOContainer)container;
}