An annotation-based Java library for creating Thrift serializable types and services.
Java Thrift HTML GAP
Clone or download
Permalink
Failed to load latest commit information.
src/license Drop custom BytecodeReadingParanamer and use an official fix Dec 17, 2012
swift-annotations [maven-release-plugin] prepare for next development iteration Oct 20, 2016
swift-codec Update READMEs to indicate the project is archived/unmaintained May 16, 2018
swift-generator-cli Update READMEs to indicate the project is archived/unmaintained May 16, 2018
swift-generator Allow fallback to plain java namespace if java.swift is missing Oct 20, 2016
swift-idl-parser Update READMEs to indicate the project is archived/unmaintained May 16, 2018
swift-javadoc [maven-release-plugin] prepare for next development iteration Oct 20, 2016
swift-load-generator [maven-release-plugin] prepare for next development iteration Oct 20, 2016
swift-maven-plugin Update READMEs to indicate the project is archived/unmaintained May 16, 2018
swift-service Update READMEs to indicate the project is archived/unmaintained May 16, 2018
swift-test-utils [maven-release-plugin] prepare for next development iteration Oct 20, 2016
swift2thrift-generator-cli Update READMEs to indicate the project is archived/unmaintained May 16, 2018
.arcconfig Initial revision for review. Apr 30, 2012
.gitignore Remove dependency-reduced-pom.xml Jan 15, 2013
CHANGES.md CHANGES.md Aug 1, 2014
NEWS.md Update the swift code to use the split timeouts for receive and read. Nov 22, 2013
README.md Update READMEs to indicate the project is archived/unmaintained May 16, 2018
license.txt Change to ASL license headers Jul 10, 2012
notice.md Change to ASL license headers Jul 10, 2012
pom.xml [maven-release-plugin] prepare for next development iteration Oct 20, 2016

README.md

Project Status: 🚨 Unmaintained 🚨

This project is archived and no longer maintained. At the time of archiving, open issues and pull requests were closed and tagged with 2018-05-archive. For pre-existing users who need an open source alternative, we recommend taking a look at airlift/drift.

Swift

Swift is an easy-to-use, annotation-based Java library for creating Thrift serializable types and services.

Swift Codec

Swift Codec is a simple library specifying how Java objects are converted to and from Thrift. This library is similar to JaxB (XML) and Jackson (JSON), but for Thrift. Swift codec supports field, method, constructor, and builder injection. For example:

@ThriftStruct
public class LogEntry
{
    private final String category;
    private final String message;

    @ThriftConstructor
    public LogEntry(String category, String message)
    {
        this.category = category;
        this.message = message;
    }

    @ThriftField(1)
    public String getCategory()
    {
        return category;
    }

    @ThriftField(2)
    public String getMessage()
    {
        return message;
    }
}

Swift Service

Swift Service is a simple library annotating services to be exported with Thrift. For example:

@ThriftService("scribe")
public class InMemoryScribe
{
    private final List<LogEntry> messages = new ArrayList<>();

    public List<LogEntry> getMessages()
    {
        return messages;
    }

    @ThriftMethod("Log")
    public ResultCode log(List<LogEntry> messages)
    {
        this.messages.addAll(messages);
        return ResultCode.OK;
    }
}

Swift Generator

Swift Generator is a library that creates Java code usable with the Swift codec from Thrift IDL files and vice versa.

Swift Generator CLI and Swift2Thrift Generator CLI are command-line front-ends to this generator.

Swift Maven plugin

Swift Maven plugin allows using the code generator from a maven build and generate source code on the fly.