io.airlift.drift:drift-maven-plugin

Maven plugin for Drift

License

License

Categories

Categories

Maven Build Tools Drift Net Networking
GroupId

GroupId

io.airlift.drift
ArtifactId

ArtifactId

drift-maven-plugin
Last Version

Last Version

1.18
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Maven plugin for Drift

Download drift-maven-plugin

How to add to project

<plugin>
    <groupId>io.airlift.drift</groupId>
    <artifactId>drift-maven-plugin</artifactId>
    <version>1.18</version>
</plugin>

Dependencies

compile (1)

Group / Artifact Type Version
io.airlift.drift : drift-idl-generator jar 1.18

provided (4)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.5.3
org.apache.maven : maven-artifact jar 3.5.3
org.apache.maven : maven-plugin-api jar 3.5.3
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5

runtime (1)

Group / Artifact Type Version
com.google.guava : guava jar 24.1-jre

test (3)

Group / Artifact Type Version
io.takari.maven.plugins : takari-plugin-testing jar 2.9.1
io.takari.maven.plugins : takari-plugin-integration-testing pom 2.9.1
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Drift

Maven Central Build Status

Drift is an easy-to-use, annotation-based Java library for creating Thrift clients and serializable types. The client library is similar to JAX-RS (HTTP Rest) and the serialization library is similar to JaxB (XML) and Jackson (JSON), but for Thrift.

Example

The following interface defines a client for a Scribe server:

@ThriftService
public interface Scribe
{
    @ThriftMethod
    ResultCode log(List<LogEntry> messages);
}

The log method above uses the LogEntry Thrift struct which is defined as follows:

@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;
    }
}

An instance of the Scribe client can be created using a DriftClientFactory:

// create a client
Scribe scribe = clientFactory.createDriftClient(Scribe.class);

// use client
scribe.log(Arrays.asList(new LogEntry("category", "message")));

Detailed Documentation

io.airlift.drift

Versions

Version
1.18
1.17
1.16
1.15
1.14
1.13
1.12
1.11
1.10
1.9
1.8
1.7
1.6
1.5
1.4
1.3
1.2