Class AetherCloudClient

java.lang.Object
io.aether.cloud.client.AetherCloudClient
All Implemented Interfaces:
io.aether.utils.interfaces.Destroyable

public final class AetherCloudClient extends Object implements io.aether.utils.interfaces.Destroyable
  • Field Details

    • startFuture

      public final io.aether.utils.futures.AFuture startFuture
    • onClientStream

      public final io.aether.utils.slots.EventConsumer<MessageNode> onClientStream
    • destroyer

      public final io.aether.utils.Destroyer destroyer
    • isRecoveryInProgress

      public final AtomicBoolean isRecoveryInProgress
    • recoveryFuture

      public final io.aether.utils.futures.AFuture recoveryFuture
  • Constructor Details

    • AetherCloudClient

      public AetherCloudClient()
    • AetherCloudClient

      public AetherCloudClient(ClientState state)
    • AetherCloudClient

      public AetherCloudClient(ClientState state, String name)
  • Method Details

    • populateCachesFromState

      public void populateCachesFromState()
    • getClientGroups

      public io.aether.utils.futures.ARFuture<Set<Long>> getClientGroups(UUID uid)
    • getAllAccessedClients

      public io.aether.utils.futures.ARFuture<Set<UUID>> getAllAccessedClients(UUID uid)
    • checkAccess

      public io.aether.utils.futures.ARFuture<Boolean> checkAccess(UUID uid1, UUID uid2)
    • getGroup

      public io.aether.utils.futures.ARFuture<io.aether.api.common.AccessGroup> getGroup(long groupId)
    • getClientState

      public ClientState getClientState()
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getServer

      public io.aether.utils.futures.ARFuture<io.aether.api.common.ServerDescriptor> getServer(int id)
    • getServerDescriptorForUid

      public void getServerDescriptorForUid(@NotNull @NotNull UUID uid, io.aether.utils.interfaces.AConsumer<io.aether.api.common.ServerDescriptor> t)
    • connect

      public io.aether.utils.futures.AFuture connect()
    • forceUpdateStateFromCache

      public io.aether.utils.futures.AFuture forceUpdateStateFromCache()
    • triggerRecovery

      public io.aether.utils.futures.AFuture triggerRecovery()
    • getUid

      public UUID getUid()
    • getAuthApi1

      public <T> io.aether.utils.futures.ARFuture<T> getAuthApi1(@NotNull @NotNull io.aether.utils.interfaces.AFunction<io.aether.api.clientserverapi.AuthorizedApi, io.aether.utils.futures.ARFuture<T>> t)
    • getAuthApiFuture

      public io.aether.utils.futures.ARFuture<io.aether.api.clientserverapi.AuthorizedApi> getAuthApiFuture()
    • getAnyConnection

      public io.aether.utils.futures.ARFuture<Connection<?,?>> getAnyConnection()
    • getAuthApi

      public void getAuthApi(@NotNull @NotNull io.aether.utils.interfaces.AConsumer<io.aether.api.clientserverapi.AuthorizedApi> t)
    • flush

      public void flush()
    • getConnections

      public Collection<ConnectionWork> getConnections()
    • getCloud

      public io.aether.utils.futures.ARFuture<ClientCloud> getCloud(@NotNull @NotNull UUID uid)
    • getPingTime

      public long getPingTime()
    • isRegistered

      public boolean isRegistered()
    • confirmRegistration

      public void confirmRegistration(io.aether.api.clientserverregapi.FinishResult regResp)
    • getMessageNode

      public MessageNode getMessageNode(@NotNull @NotNull UUID uid)
    • getMessageNode

      public MessageNode getMessageNode(@NotNull @NotNull UUID uid, MessageEventListener strategy)
    • openStreamToClientDetails

      public MessageNode openStreamToClientDetails(@NotNull @NotNull UUID uid, MessageEventListener strategy)
    • destroy

      public io.aether.utils.futures.AFuture destroy(boolean force)
      Specified by:
      destroy in interface io.aether.utils.interfaces.Destroyable
    • isConnected

      public boolean isConnected()
    • getParent

      public UUID getParent()
    • getMasterKey

      public io.aether.crypto.AKey.Symmetric getMasterKey()
    • getCryptLib

      public io.aether.api.common.CryptoLib getCryptLib()
    • getAlias

      public UUID getAlias()
    • onMessage

      public void onMessage(io.aether.utils.interfaces.ABiConsumer<UUID,byte[]> consumer)
    • onClientStream

      public void onClientStream(io.aether.utils.interfaces.AConsumer<MessageNode> consumer)
    • onNewChildren

      public void onNewChildren(io.aether.utils.interfaces.AConsumer<UUID> consumer)
    • createAccessGroup

      public io.aether.utils.futures.ARFuture<io.aether.common.AccessGroupI> createAccessGroup(UUID... uids)
    • createAccessGroupWithOwner

      public io.aether.utils.futures.ARFuture<io.aether.common.AccessGroupI> createAccessGroupWithOwner(UUID owner, UUID... uids)
    • verifySign

      public boolean verifySign(io.aether.crypto.SignedKey signedKey)
    • sendMessage

      public io.aether.utils.futures.AFuture sendMessage(UUID uid, byte[] message)
    • getClientApi

      @Deprecated public void getClientApi(UUID uid, io.aether.utils.interfaces.AConsumer<io.aether.api.clientserverapi.ServerApiByUid> callback)
      Deprecated.
    • getCryptoEngineForServer

      public io.aether.crypto.CryptoEngine getCryptoEngineForServer(short serverId)
    • getNextPing

      public long getNextPing()
    • setCloud

      public void setCloud(UUID uid, io.aether.api.common.Cloud cloud)
    • requestCloudConfig

      public void requestCloudConfig(UUID subjectUid)
    • putServerDescriptor

      public void putServerDescriptor(io.aether.api.common.ServerDescriptor s)
    • getMyIp

      public io.aether.utils.futures.ARFuture<io.aether.api.common.IpInfo> getMyIp()
    • reportAppliedConfig

      public void reportAppliedConfig(io.aether.api.common.AppliedConfig[] configs)
    • of

      public static AetherCloudClient of(ClientState state)
    • asClient

      public static <LT, RT extends io.aether.net.fastMeta.RemoteApi> AetherCloudClient asClient(UUID parentUid, String name, io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> localMeta, io.aether.net.fastMeta.FastMetaApi<?,RT> remoteMeta, io.aether.utils.interfaces.AFunction<RT,LT> localApiFactory)
    • asClient

      public static <LT, RT extends io.aether.net.fastMeta.RemoteApi> AetherCloudClient asClient(UUID parentUid, URI regUri, String name, io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> localMeta, io.aether.net.fastMeta.FastMetaApi<?,RT> remoteMeta, io.aether.utils.interfaces.AFunction<RT,LT> localApiFactory)
    • asClient

      public static <LT, RT extends io.aether.net.fastMeta.RemoteApi> AetherCloudClient asClient(ClientState state, String name, io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> localMeta, io.aether.net.fastMeta.FastMetaApi<?,RT> remoteMeta, io.aether.utils.interfaces.AFunction<RT,LT> localApiFactory)
    • asServer

      public static <LT> AetherCloudClient asServer(ClientState state, String name, io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> serviceMeta, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> localApiFactory)
    • asServer

      public static <LT> AetherCloudClient asServer(UUID parentUid, String name, io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> serviceMeta, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> localApiFactory)
    • asServer

      public static <LT> AetherCloudClient asServer(UUID parentUid, URI regUri, String name, io.aether.net.fastMeta.FastMetaApi<LT, ? extends LT> serviceMeta, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> localApiFactory)