jacson logo courtesy from Doris & Frank.Getting started > How to run it? > Embed in a Java Program2005-10-04 00:11:20 v0.90
Jacson, say Jackson, think J-Scan

Embed in a Java Program


What is Jacson?
Getting started
  Download instructions
  How to install?
  Configuration
  How to run it?
    The Commandline
    The Integration into Ant
    Embed in a Java Program
How it works?
Contact
How to Contribute?
Developer Information
Other information
 

This has not yet been documented. It could be that the API needs enhancements to run without a configuration file.

There are two ways to do it,

within your program.

Embed Jacson

A brief plan is:

Have a look at the following source code for sample applications:

  • The main() method of Jacson.
  • The main() method of JacsonTail.
  • The JacsonTask class.
  • The JacsonBlocks addFilter and addEval methods.

Use Jacson as a Filter

JacsonReader implements java.io.Filter and can be used whereever such a filter can be used. The most useful application I currently know is the embedding into Ant in a FilterChain.

A snippet how to use it in your program is as simple as

  Reader previousReader = ...
  JacsonReader jr = new JacsonReader(previousReader);
  jr.setConfig("the.path.to.your.config.file");

Note: That the wrapping of Jacson into a filter is slightly costly, it requires a separate thread internally. We are thinking about how to make it somewhat lighter at least in the Ant setting by using a ThreadPool.

NewsfeedRSS feed
FilefeedRSS feed
Sourceforge Logo