21 projects tagged "Apache 2.0"
SimpleTemplate is a simple template engine written in Java. You can generate formatted text from a Java bean. You can use it for generating XML files, Web sites, etc. It features simple template directives, user-selectable template directive separators, alias creation using with and set directives, support for indexing into arrays, collections, and maps, looping on an array or a collection, a simple include mechanism to reuse template files, conditional evaluation using if and ifelse, and custom list separation settings (prefix, suffix, and separators). Template files can be read from the filesystem, class path, or just a string. Support for methods, aka. sub templates.
CRest (Client REST) is a lightweight library that simplifies the integration of third party RESTful services into Java applications. CRest is mainly annotation-driven, allowing the developer to focus on the essential aspects of the integration of a REST service, such as the definition of the Java interface that maps the remote REST methods and the data model the interface will deal with. The rest is achieved by annotating a plain Java interface with the relevant information such as the service end-point, the desired timeouts, URL formats, etc. CRest will handle everything else, including HTTP request generation, auto marshalling of the response, and more.
Hades is a high availability (HA) data source. This HA data source contains two other data sources: the main one and the failover one. The HA data source exposes one of them at a time and can automatically switch between them when certain conditions are met. These conditions are highly configurable. By default, when the main data source is overloaded, the failover data source is used. The load of a data base is determined on the basis of the average execution time of some configurable SQL statement that is examined periodically. The HA data source exposes through JMX its state and also operations for manual switching between the two contained data sources in case automatic switching must be suppressed for some reason.
Yap4j is the simplest library for parsing CSV files in Java. It deserializes CSV files into a list of POJOs using a set of Java annotations, while allowing you to specify Object-CSV mappings. It automatically converts to and from a wide range of data types, and includes support for types from popular libraries such as Joda Time, and support for custom record delimiters.
kongcurrent provides an easy-to use helper to assist debugging issues which cause exceptions under concurrent access. It was inspired by a problem in which a non-thread-safe Map object held by a third party framework was accidentally shared between threads, causing a ConcurrentModificationException. The helper (a "monitor") creates a proxied version of an object implementing some interface. The proxy can track invocations of the objects' methods and can report on potential concurrent access on the object. This can be used to help find code paths which concurrently access the object through its interface methods. By design, the helper is extensible, and can be adapted to more specific needs.
CmdOption is a simple annotation-driven command line parser toolkit for Java 5 applications. Everything you need is (at least one) simple configuration object. Each field and method annotated with an CmdOption annotation will be processed. Based on this config, CmdOption is able to parse any command line, guaranteeing the declared specification. The result is directly stored in the given config object. When errors occur, CmdOption gives a meaningful error message. Generated output and validation/error message can be localized.
jmxtrans is effectively the missing connector between JMX and whatever logging or graphing package that you can dream up. jmxtrans is very powerful tool that reads JSON configuration files specifying servers/ports and JMX domains/attributes and then outputs the data in whatever format you want via special "Writer" objects that you can code up yourself. It does this with a very efficient engine design that will scale to querying literally thousands of machines. The core engine is pretty solid and writers are included for cacti/rrdtool, graphite, and stdout.