aboutsummaryrefslogtreecommitdiff
path: root/central/src/main/java/moe/yuuta/dn42peering/asn/IASNService.java
blob: d4b31aee77ac308b425de9110ee7ae14c3df5c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package moe.yuuta.dn42peering.asn;

import io.vertx.codegen.annotations.Fluent;
import io.vertx.codegen.annotations.ProxyGen;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import moe.yuuta.dn42peering.whois.WhoisObject;

import javax.annotation.Nonnull;
import java.util.List;

@ProxyGen
public interface IASNService {
    String ADDRESS = IASNService.class.getName();

    @Nonnull
    static IASNService createProxy(@Nonnull Vertx vertx, @Nonnull String address) {
        return new IASNServiceVertxEBProxy(vertx, address);
    }

    @Fluent
    @Nonnull
    IASNService exists(@Nonnull String asn, boolean requireActivationStatus, boolean activated,
                @Nonnull Handler<AsyncResult<Boolean>> handler);

    @Fluent
    @Nonnull
    IASNService markAsActivated(@Nonnull String asn, @Nonnull Handler<AsyncResult<Void>> handler);

    @Fluent
    @Nonnull
    IASNService changePassword(@Nonnull String asn, @Nonnull String newPassword,
                        @Nonnull Handler<AsyncResult<Void>> handler);

    @Fluent
    @Nonnull
    IASNService registerOrChangePassword(@Nonnull String asn, @Nonnull String newPassword,
                               @Nonnull Handler<AsyncResult<Void>> handler);

    @Fluent
    @Nonnull
    IASNService auth(@Nonnull String asn, @Nonnull String password, @Nonnull Handler<AsyncResult<Boolean>> handler);

    @Fluent
    @Nonnull
    IASNService delete(@Nonnull String asn, @Nonnull Handler<AsyncResult<Void>> handler);

    @Fluent
    @Nonnull
    IASNService lookupEmails(@Nonnull WhoisObject asn, @Nonnull Handler<AsyncResult<List<String>>> handler);

    @Fluent
    @Nonnull
    IASNService count(@Nonnull Handler<AsyncResult<Integer>> handler);

    @Fluent
    @Nonnull
    IASNService list(@Nonnull Handler<AsyncResult<List<ASN>>> handler);
}