javolution.doc-files.overview.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javolution-core-java-msftbx
Show all versions of javolution-core-java-msftbx
Only the Java Core part of Javolution library, with slight modifications for use in MSFTBX.
The newest version!
Javolution - JavaTM Solution for Real-Time and Embedded Systems.
License:
Permission to use, copy, modify, and distribute this software is freely granted,
provided that copyright notices are preserved (the full license text can be found
here).
Javolution's users are encouraged to show their support with the
button.
Overview:
Although JavaTM has been very successful on the server-side; It has few shortcomings limiting
its adoption for others domains such as real-time, embedded or high-performance applications.
For these, the Javolution library provides important "pieces" missing
from the JavaTM core library and making the JavaTM platform even more attractive.
Usage:
Javolution can be used as a standard OSGi bundle.
import org.osgi.framework.*;
import org.osgi.util.tracker.ServiceTracker;
public class MyActivator implements BundleActivator {
ServiceTracker<XMLInputFactory, XMLInputFactory> tracker;
public void start(BundleContext bc) throws Exception {
tracker = new ServiceTracker<>(bc, XMLInputFactory.class, null);
tracker.open();
parse();
}
public void stop(BundleContext bc) throws Exception {
tracker.close();
}
public void parse() throws XMLStreamException {
XMLInputFactory factory = tracker.getService();
factory.setProperty(XMLInputFactory.IS_COALESCING, true); // Configures.
...
}
}
Or as a standard Java library (does not require OSGi runtime).
import javolution.osgi.internal.OSGiServices;
public class Main {
public static void main(String[] args) throws XMLStreamException {
XMLInputFactory factory = OSGiServices.getXMLInputFactory();
factory.setProperty(XMLInputFactory.IS_COALESCING, true); // Configures.
...
}
}
Services:
Javolution publishes the following OSGi services.
Published Service
Description
{@link javolution.xml.stream.XMLInputFactory}
StAX-like version of javax.xml.stream.XMLInputFactory avoiding {@code String} allocations.
{@link javolution.xml.stream.XMLOutputFactory}
StAX-like version of javax.xml.stream.XMLOutputFactory using {@code CharSequence} instead of {@code String}
These services can be accessed through the standard OSGi registry
or using {@code javolution.osgi.internal.OSGiServices} when running outside OSGi.
Javolution listen to the following OSGi services.
Subscribed Service
Description
{@code org.osgi.service.log.LogService}
OSGi service to log messages.
{@link javolution.context.LogContext}
Service to support asynchronous logging.
{@link javolution.context.ConcurrentContext}
Service to support concurrent executions.
{@link javolution.context.LocalContext}
Service to support locally scoped settings.
{@link javolution.context.ComputeContext}
Service for executing kernels functions on computing devices
(OpenCL compliant).
{@link javolution.context.SecurityContext}
Service granting security authorizations.
{@link javolution.context.StorageContext}
Service to store/retrieve persistent data/dataset.
{@link javolution.text.TextContext}
Service to support text parsing/formatting.
{@link javolution.xml.XMLContext}
Service to support XML serialization/deserialization.