java.lang.Object
convex.api.Convex
convex.api.ConvexDirect
- All Implemented Interfaces:
AutoCloseable
Convex API instance that directly interacts with a Peer instance
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConvexDirect(Address address, AKeyPair keyPair, Peer initial) -
Method Summary
Modifier and TypeMethodDescription<T extends ACell>
CompletableFuture<T> Attempts to acquire a complete persistent data structure for the given hash from the connected peer.voidclose()Disconnects the client from the network, releasing any connection resources.static ConvexDirectGets the remote address for this Convex client instancebooleanChecks if this Convex client instance has an open connection.Submits a Message to the connected peer, returning a Future for any ResultmessageRaw(Blob message) Submits raw message data to the Convex network, returning a Future for any ResultSubmits a query to the Convex network, returning a Future once the query has been successfully queued.voidrequestChallenge(SignedData<ACell> data) Request a challenge.Submits a status request to the Convex network peer, returning a Future once the request has been successfully queued.toString()transact(SignedData<ATransaction> signedTransaction) Submits a signed transaction to the Convex network, returning a Future once the transaction has been successfully queued.Methods inherited from class convex.api.Convex
acquire, acquireState, clearSequence, connect, connect, connect, connect, connect, createAccount, createAccountSync, finalize, getAccountKey, getAccountKey, getAddress, getBalance, getBalance, getKeyPair, getLocalServer, getNextID, getSequence, getSequence, getTimeout, isAutoSequence, isPreCompile, lookupSequence, maybeUpdateSequence, preCompile, prepareTransaction, prepareTransaction, query, query, querySync, querySync, querySync, querySync, requestStatusSync, requestStatusSync, resolve, setAddress, setAddress, setAutoSequence, setKeyPair, setNextSequence, setPreCompile, setTimeout, signData, transact, transact, transact, transactSync, transactSync, transactSync, transactSync, transactSync, transfer, transferSync
-
Field Details
-
peer
-
-
Constructor Details
-
ConvexDirect
-
-
Method Details
-
create
-
isConnected
public boolean isConnected()Description copied from class:ConvexChecks if this Convex client instance has an open connection.- Specified by:
isConnectedin classConvex- Returns:
- true if connected, false otherwise
-
transact
Description copied from class:ConvexSubmits a signed transaction to the Convex network, returning a Future once the transaction has been successfully queued. Updates cached sequence number on best effort basis. -
messageRaw
Description copied from class:ConvexSubmits raw message data to the Convex network, returning a Future for any Result- Specified by:
messageRawin classConvex- Parameters:
message- Raw message data- Returns:
- A Future for the result of the query
-
message
Description copied from class:ConvexSubmits a Message to the connected peer, returning a Future for any Result -
acquire
Description copied from class:ConvexAttempts to acquire a complete persistent data structure for the given hash from the connected peer. Uses the store provided as a destination. -
requestStatus
Description copied from class:ConvexSubmits a status request to the Convex network peer, returning a Future once the request has been successfully queued.- Specified by:
requestStatusin classConvex- Returns:
- A Future for the result of the requestStatus
-
requestChallenge
Description copied from class:ConvexRequest a challenge. This is request is made by any peer that needs to find out if another peer can be trusted.- Specified by:
requestChallengein classConvex- Parameters:
data- Signed data to send to the peer for the challenge.- Returns:
- A Future for the result of the requestChallenge
-
query
Description copied from class:ConvexSubmits a query to the Convex network, returning a Future once the query has been successfully queued. -
close
public void close()Description copied from class:ConvexDisconnects the client from the network, releasing any connection resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classConvex
-
toString
-
getHostAddress
Description copied from class:ConvexGets the remote address for this Convex client instance- Specified by:
getHostAddressin classConvex- Returns:
- Socket address
-
reconnect
- Specified by:
reconnectin classConvex- Throws:
IOExceptionTimeoutExceptionInterruptedException
-