JavaScript is disabled on your browser.

Javolution Core (Java) 6.0.0 API

Javolution - JavaTM Solution for Real-Time and Embedded Systems.

See: Description

Packages
Package Description
javolution.context
Run-time contexts to facilitate separation of concerns and achieve higher level of performance and flexibility.
javolution.io
Utility classes for input and output such as Struct and Union for direct interoperability with C/C++.
javolution.lang
Fundamental classes, interfaces and annotations.
javolution.test
Testing tools for validation and performance.
javolution.text
Text handling package.
javolution.util
High-performance collection classes with worst case execution time behavior documented.
javolution.util.function
Basic functions for lambda expressions and method references.
javolution.util.service
Service interfaces to be implemented by javolution.util.* collections and collections views.
javolution.xml
Support for the encoding of objects, and the objects reachable from them, into XML; and the complementary reconstruction of the object graph from XML.
javolution.xml.sax
SAX2 and high-performance SAX2-Like parsers.
javolution.xml.stream
StAX-like XML readers/writers which do not require object creation (such as String) and are consequently faster than standard StAX.
javolution.xml.ws
Classes and interfaces to create and handle web services.

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.
 // Instantiates a new reader.
 String xml = "<test>This is a test</test>";
 CharSequenceReader in = new CharSequenceReader().setInput(xml);
 XMLStreamReader reader = factory.createXMLStreamReader(in);
 
 // Parses XML.
 while (reader.hasNext()) {
 int eventType = reader.next();
 if (eventType == XMLStreamConstants.CHARACTERS) {
 System.out.println(reader.getText());
 }
 }
 
 // Closes the reader which may be recycled back to the factory.
 reader.close();
 } 
}

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.
 
 // Instantiates a reader.
 String xml = "<test>This is a test</test>";
 CharSequenceReader in = new CharSequenceReader().setInput(xml);
 XMLStreamReader reader = factory.createXMLStreamReader(in);
 
 // Parses XML.
 while (reader.hasNext()) {
 int eventType = reader.next();
 if (eventType == XMLStreamConstants.CHARACTERS) {
 System.out.println(reader.getText());
 }
 }
 
 // Closes the reader which may be recycled back to the factory.
 reader.close();
 }
}

Services:

Javolution publishes the following OSGi services.

Published Service Description
XMLInputFactory StAX-like version of javax.xml.stream.XMLInputFactory avoiding String allocations.
XMLOutputFactory StAX-like version of javax.xml.stream.XMLOutputFactory using CharSequence instead of String

These services can be accessed through the standard OSGi registry or using javolution.osgi.internal.OSGiServices when running outside OSGi.

Javolution listen to the following OSGi services.

Subscribed Service Description
org.osgi.service.log.LogService OSGi service to log messages.
LogContext Service to support asynchronous logging.
ConcurrentContext Service to support concurrent executions.
LocalContext Service to support locally scoped settings.
SecurityContext Service granting security authorizations.
TextContext Service to support text parsing/formatting.
XMLContext Service to support XML serialization/deserialization.

Copyright © 2005-2013 Javolution. All Rights Reserved.

AltStyle によって変換されたページ (->オリジナル) /