io.airlift.drift:drift-api

Drift annotations and exceptions for use in Thrift interfaces and types

Лицензия

Лицензия

Категории

Категории

Drift Сеть Networking
Группа

Группа

io.airlift.drift
Идентификатор

Идентификатор

drift-api
Последняя версия

Последняя версия

1.18
Дата

Дата

Тип

Тип

jar
Описание

Описание

Drift annotations and exceptions for use in Thrift interfaces and types

Скачать drift-api

Как подключить последнюю версию

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

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

Версии библиотеки

Версия
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