public void destroy() { for (ServiceRegistration<?> reg: managedServiceRegs) { AriesFrameworkUtil.safeUnregisterService(reg); } }
/** * * @param version * version for the verioninfo */ public VersionRange(String version) { this.version = version; processVersionAttribute(version); }
/** * this method returns the exact version from the versionInfo obj. * this is used for DeploymentContent only to return a valid exact version * otherwise, null is returned. * @return the exact version */ public Version getExactVersion() { Version v = null; if (isExactVersion()) { v = getMinimumVersion(); } return v; }
@Override public void stop(BundleContext context) { proxyManager.close(); AriesFrameworkUtil.safeUnregisterService(osgiUrlReg); AriesFrameworkUtil.safeUnregisterService(blueprintUrlReg); }
public static boolean inRange(String versionText, String range) { VersionRange versionRange = VersionRange.parseVersionRange(range); Version version = VersionTable.getVersion(versionText); if (version != null && versionRange != null) { return versionRange.matches(version); } return false; }
public ClassLoader run() { return AriesFrameworkUtil.getClassLoader(b); } });
/** * This method should be used to create a version range from a single * version string. * @param version * version for the versioninfo * @param exactVersion * whether this is an exact version {@code true} or goes to infinity * {@code false} */ public VersionRange(String version, boolean exactVersion) { if (exactVersion) { // Do not store this string as it might be just a version, or a range! processExactVersionAttribute(version); } else { this.version = version; processVersionAttribute(this.version); } assertInvariants(); }
public ICloseableDirectory toCloseable() { try { return new NestedCloseableDirectory(archive, this); } catch (IOException e) { throw new IORuntimeException("Exception while creating extracted version of nested zip file", e); } } }
public ICloseableDirectory toCloseable() { try { return new ZipCloseableDirectory(zip, this); } catch (IOException e) { throw new IORuntimeException("IOException opening zip file: " + this, e); } } }
/** * Parse a version range.. * * @param s * @return VersionRange object. * @throws IllegalArgumentException * if the String could not be parsed as a VersionRange */ public static VersionRange parseVersionRange(String s) throws IllegalArgumentException { return new VersionRange(s); }
/** * * Splits a delimiter separated string, tolerating presence of non separator commas * within double quoted segments. * * Eg. * com.ibm.ws.eba.helloWorldService;version="[1.0.0, 1.0.0]" & * com.ibm.ws.eba.helloWorldService;version="1.0.0" * com.ibm.ws.eba.helloWorld;version="2";bundle-version="[2,30)" * com.acme.foo;weirdAttr="one;two;three";weirdDir:="1;2;3" * @param value the value to be split * @param delimiter the delimiter string such as ',' etc. * @return List<String> the components of the split String in a list */ public static List<String> split(String value, String delimiter) { return ManifestHeaderUtils.split(value, delimiter); }
@Override public void serviceLost() { AriesFrameworkUtil.safeUnregisterService(osgiUrlReg); osgiUrlReg = null; }
public ProxyClassLoader(Bundle bundle) { super(AriesFrameworkUtil.getClassLoader(bundle)); }
/** * Parse a version range.. * * @param s * @return VersionRange object. * @throws IllegalArgumentException if the String could not be parsed as a VersionRange */ public static VersionRange parseVersionRange(String s) throws IllegalArgumentException{ return new VersionRange(s); }
public void destroy() { for(ServiceRegistration<?> reg: managedServiceRegs) { AriesFrameworkUtil.safeUnregisterService(reg); } }
/** * Parse a version range and indicate if the version is an exact version * * @param s * @param exactVersion * @return VersionRange object. * @throws IllegalArgumentException if the String could not be parsed as a VersionRange */ public static VersionRange parseVersionRange(String s, boolean exactVersion) throws IllegalArgumentException{ return new VersionRange(s, exactVersion); }
public void removedService(ServiceReference ref, Object service) { AriesFrameworkUtil.safeUnregisterService((ServiceRegistration)service); }
/** * Parse a version range and indicate if the version is an exact version * * @param s * @param exactVersion * @return VersionRange object. * @throws IllegalArgumentException * if the String could not be parsed as a VersionRange */ public static VersionRange parseVersionRange(String s, boolean exactVersion) throws IllegalArgumentException { return new VersionRange(s, exactVersion); } }
public void stop(BundleContext context) { AriesFrameworkUtil.safeUnregisterService(reg); }
public void stop(BundleContext bundleContext) throws Exception { AriesFrameworkUtil.safeUnregisterService(serviceReg); }