KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > internal > resolver > SystemState


1 /*******************************************************************************
2  * Copyright (c) 2003, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.osgi.internal.resolver;
12
13 import org.eclipse.osgi.service.resolver.*;
14 import org.osgi.framework.BundleException;
15
16 // this class provides synchronous access to resolve and add/remove/update bundle for the framework
17
public class SystemState extends StateImpl {
18     synchronized public boolean addBundle(BundleDescription description) {
19         return super.addBundle(description);
20     }
21
22     synchronized public boolean removeBundle(BundleDescription toRemove) {
23         return super.removeBundle(toRemove);
24     }
25
26     synchronized public boolean updateBundle(BundleDescription newDescription) {
27         return super.updateBundle(newDescription);
28     }
29
30     public StateDelta compare(State state) throws BundleException {
31         // we don't implement this (no big deal: the system state is private to the framework)
32
throw new UnsupportedOperationException JavaDoc();
33     }
34 }
35
Popular Tags