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
    • clouds

      public final io.aether.utils.rcollections.BMap<UUID, ClientCloud> clouds
    • servers

      public final io.aether.utils.rcollections.BMap<Integer, io.aether.api.common.ServerDescriptor> servers
    • clientGroups

      public final io.aether.utils.rcollections.BMap<UUID, Set<UUID>> clientGroups
    • accessGroups

      public final io.aether.utils.rcollections.BMap<UUID, io.aether.api.common.AccessGroup> accessGroups
    • allAccessedClients

      public final io.aether.utils.rcollections.BMap<UUID, Set<UUID>> allAccessedClients
    • accessCheckCache

      public final io.aether.utils.rcollections.BMap<io.aether.api.common.AccessCheckPair, Boolean> accessCheckCache
    • serversMFuture

      public final io.aether.utils.slots.AMFuture<io.aether.api.common.ServerDescriptorWithGeo[]> serversMFuture
    • newAccessGroupIdMFuture

      public final io.aether.utils.slots.AMFuture<UUID> newAccessGroupIdMFuture
    • myIpMFuture

      public final io.aether.utils.slots.AMFuture<io.aether.api.common.IpInfo> myIpMFuture
    • pingAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> pingAckMFuture
    • openReceiveWindowAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> openReceiveWindowAckMFuture
    • addServersToCloudAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> addServersToCloudAckMFuture
    • removeServersFromCloudAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> removeServersFromCloudAckMFuture
    • selfDestructAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> selfDestructAckMFuture
    • setAliasAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> setAliasAckMFuture
    • setParentAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> setParentAckMFuture
    • blockAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> blockAckMFuture
    • unblockAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> unblockAckMFuture
    • setBeneficiaryAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> setBeneficiaryAckMFuture
    • setMsgQueueLimitAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> setMsgQueueLimitAckMFuture
    • setMsgTimeLimitAckMFuture

      public final io.aether.utils.slots.AMFuture<Boolean> setMsgTimeLimitAckMFuture
    • cloudPositions

      public final io.aether.utils.rcollections.BMap<UUID, io.aether.api.common.CloudConfig> cloudPositions
    • aliasMFuture

      public final io.aether.utils.slots.AMFuture<UUID> aliasMFuture
    • uaps

      public final io.aether.utils.rcollections.BMap<UUID, io.aether.api.clientserverapi.Uap> uaps
    • clientTimings

      public final io.aether.utils.rcollections.BMap<UUID, io.aether.api.clientserverapi.ClientTiming> clientTimings
    • clientActivities

      public final io.aether.utils.rcollections.BMap<UUID, io.aether.api.clientserverapi.ClientActivity[]> clientActivities
    • clientLogs

      public final io.aether.utils.rcollections.BMap<UUID, io.aether.api.clientserverapi.ClientLogEntry[]> clientLogs
    • clientConnections

      public final io.aether.utils.rcollections.BMap<UUID, io.aether.api.clientserverapi.ClientConnectionInfo[]> clientConnections
    • clientMessages

      public final io.aether.utils.rcollections.BMap<UUID, io.aether.api.clientserverapi.MessageInfo[]> clientMessages
    • accessCheckAcks

      public final io.aether.utils.rcollections.BMap<UUID,Boolean> accessCheckAcks
    • addToAccessGroupResults

      public final io.aether.utils.rcollections.BMap<io.aether.utils.tuples.Tuple2<UUID,UUID>, Boolean> addToAccessGroupResults
    • removeFromAccessGroupResults

      public final io.aether.utils.rcollections.BMap<io.aether.utils.tuples.Tuple2<UUID,UUID>, Boolean> removeFromAccessGroupResults
  • Constructor Details

  • Method Details

    • getConnectionPeer

      public io.aether.cloud.client.ConnectionPeer getConnectionPeer()
    • probeLanFor

      public void probeLanFor(UUID targetUid)
    • populateCachesFromState

      public void populateCachesFromState()
    • getClientGroups

      public io.aether.utils.futures.ARFuture<Set<UUID>> 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(UUID 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()
    • getPeerIdentity

      public io.aether.utils.futures.ARFuture<PeerIdentityCredentials> getPeerIdentity()
    • withAuthApi

      public void withAuthApi(@NotNull @NotNull io.aether.utils.interfaces.AConsumer<io.aether.api.clientserverapi.AuthorizedApi> t)
    • 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)
    • getLoginApiVersion

      public int getLoginApiVersion()
    • getPingTime

      public long getPingTime()
    • isRegistered

      public boolean isRegistered()
    • confirmRegistration

      public void confirmRegistration(io.aether.api.clientserverapi.RegistrationDirectResult 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)
    • requestWebRtcSession

      public io.aether.utils.futures.ARFuture<io.aether.api.clientserverapi.WebRtcSession> requestWebRtcSession(UUID uid)
    • publishWebRtcSession

      public io.aether.utils.futures.AFuture publishWebRtcSession(io.aether.api.clientserverapi.WebRtcSession session)
      Publishes our local WebRTC session to every server in our own cloud.
    • getServers

      public io.aether.utils.futures.ARFuture<io.aether.api.common.ServerDescriptorWithGeo[]> getServers()
    • sendMessage

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

      public io.aether.utils.futures.ARFuture<io.aether.api.clientserverapi.ServerApiByUid> getClientApi(UUID uid)
    • 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)