drift-transport-netty

Annotation based Thrift implementation

License

License

Categories

Categories

Net Netty Networking Drift
GroupId

GroupId

io.airlift.drift
ArtifactId

ArtifactId

drift-transport-netty
Last Version

Last Version

1.18
Release Date

Release Date

Type

Type

jar
Description

Description

drift-transport-netty
Annotation based Thrift implementation

Download drift-transport-netty

How to add to project

<!-- https://jarcasting.com/artifacts/io.airlift.drift/drift-transport-netty/ -->
<dependency>
    <groupId>io.airlift.drift</groupId>
    <artifactId>drift-transport-netty</artifactId>
    <version>1.18</version>
</dependency>
// https://jarcasting.com/artifacts/io.airlift.drift/drift-transport-netty/
implementation 'io.airlift.drift:drift-transport-netty:1.18'
// https://jarcasting.com/artifacts/io.airlift.drift/drift-transport-netty/
implementation ("io.airlift.drift:drift-transport-netty:1.18")
'io.airlift.drift:drift-transport-netty:jar:1.18'
<dependency org="io.airlift.drift" name="drift-transport-netty" rev="1.18">
  <artifact name="drift-transport-netty" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.airlift.drift', module='drift-transport-netty', version='1.18')
)
libraryDependencies += "io.airlift.drift" % "drift-transport-netty" % "1.18"
[io.airlift.drift/drift-transport-netty "1.18"]

Dependencies

compile (17)

Group / Artifact Type Version
io.airlift.drift : drift-api jar 1.18
io.airlift.drift : drift-codec jar 1.18
io.airlift.drift : drift-protocol jar 1.18
io.airlift.drift : drift-transport-spi jar 1.18
com.google.code.findbugs : jsr305 Optional jar 3.0.2
com.google.inject : guice Optional jar 4.2.0
com.google.guava : guava jar 24.1-jre
io.airlift : concurrent jar 0.173
io.airlift : configuration jar 0.173
io.airlift : log jar 0.173
io.airlift : security jar 0.173
io.airlift : units jar 1.3
io.netty : netty-all jar 4.1.29.Final
javax.inject : javax.inject Optional jar 1
javax.validation : validation-api Optional jar 1.1.0.Final
javax.annotation : javax.annotation-api jar 1.3.1
com.github.spotbugs : spotbugs-annotations Optional jar 3.1.6

test (5)

Group / Artifact Type Version
io.airlift : bootstrap jar 0.173
io.airlift : testing jar 0.173
org.testng : testng jar 6.9.6
org.assertj : assertj-core jar 3.5.2
org.apache.thrift : libthrift jar 0.12.0

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
1.1
1.0