public class DefaultContentManager extends Object implements ContentManager
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultContentManager.HValues |
| Modifier and Type | Field and Description |
|---|---|
protected io.nessus.ipfs.impl.DefaultContentManager.BCData |
bcdata |
protected io.nessus.Blockchain |
blockchain |
protected DefaultContentManager.HValues |
hvals |
protected IPFSClient |
ipfs |
static long |
IPFS_DEFAULT_TIMEOUT |
static int |
IPFS_MAX_ATTEMPTS |
protected io.nessus.Network |
network |
protected Path |
rootPath |
protected io.nessus.Wallet |
wallet |
| Constructor and Description |
|---|
DefaultContentManager(IPFSClient ipfs,
io.nessus.Blockchain blockchain) |
| Modifier and Type | Method and Description |
|---|---|
FHandle |
add(io.nessus.Wallet.Address owner,
InputStream input,
Path path)
Add content to IPFS.
|
boolean |
deleteLocalContent(io.nessus.Wallet.Address owner,
Path path)
Delete a plain file from local storage.
|
List<FHandle> |
findIPFSContent(io.nessus.Wallet.Address addr,
Long timeout)
Find registered IPFS content for a given address.
|
List<FHandle> |
findLocalContent(io.nessus.Wallet.Address owner)
Find local content for a given address.
|
PublicKey |
findRegistation(io.nessus.Wallet.Address addr)
Find the registered public key for a given address.
|
FHandle |
get(io.nessus.Wallet.Address owner,
String cid,
Path path,
Long timeout)
Get content from IPFS.
|
io.nessus.Blockchain |
getBlockchain()
Get the Blockchain
|
protected DefaultContentManager.HValues |
getHeaderValues() |
IPFSClient |
getIPFSClient()
Get the IPFS client
|
InputStream |
getLocalContent(io.nessus.Wallet.Address owner,
Path path)
Show content of a plain file from local storage.
|
Path |
getRootPath() |
protected wf.bitcoin.javabitcoindrpcclient.BitcoindRpcClient |
getRpcClient() |
PublicKey |
register(io.nessus.Wallet.Address addr)
Register an address with the system.
|
FHandle |
send(io.nessus.Wallet.Address owner,
String cid,
io.nessus.Wallet.Address target,
Long timeout)
Send content to a target address via IPFS.
|
public static final int IPFS_MAX_ATTEMPTS
public static final long IPFS_DEFAULT_TIMEOUT
protected final io.nessus.Blockchain blockchain
protected final io.nessus.Network network
protected final io.nessus.Wallet wallet
protected final DefaultContentManager.HValues hvals
protected final IPFSClient ipfs
protected final io.nessus.ipfs.impl.DefaultContentManager.BCData bcdata
protected final Path rootPath
public DefaultContentManager(IPFSClient ipfs, io.nessus.Blockchain blockchain)
public Path getRootPath()
public io.nessus.Blockchain getBlockchain()
ContentManagergetBlockchain in interface ContentManagerpublic IPFSClient getIPFSClient()
ContentManagergetIPFSClient in interface ContentManagerpublic PublicKey register(io.nessus.Wallet.Address addr) throws GeneralSecurityException
ContentManagerregister in interface ContentManagerGeneralSecurityExceptionpublic FHandle add(io.nessus.Wallet.Address owner, InputStream input, Path path) throws IOException, GeneralSecurityException
ContentManageradd in interface ContentManagerIOExceptionGeneralSecurityExceptionpublic FHandle get(io.nessus.Wallet.Address owner, String cid, Path path, Long timeout) throws IOException, GeneralSecurityException
ContentManagerget in interface ContentManagerIOExceptionGeneralSecurityExceptionpublic FHandle send(io.nessus.Wallet.Address owner, String cid, io.nessus.Wallet.Address target, Long timeout) throws IOException, GeneralSecurityException
ContentManagersend in interface ContentManagerIOExceptionGeneralSecurityExceptionpublic PublicKey findRegistation(io.nessus.Wallet.Address addr)
ContentManagerfindRegistation in interface ContentManagerpublic List<FHandle> findIPFSContent(io.nessus.Wallet.Address addr, Long timeout) throws IOException
ContentManagerfindIPFSContent in interface ContentManagerIOExceptionpublic List<FHandle> findLocalContent(io.nessus.Wallet.Address owner) throws IOException
ContentManagerfindLocalContent in interface ContentManagerIOExceptionpublic InputStream getLocalContent(io.nessus.Wallet.Address owner, Path path) throws IOException
ContentManagergetLocalContent in interface ContentManagerIOExceptionpublic boolean deleteLocalContent(io.nessus.Wallet.Address owner,
Path path)
throws IOException
ContentManagerdeleteLocalContent in interface ContentManagerIOExceptionprotected wf.bitcoin.javabitcoindrpcclient.BitcoindRpcClient getRpcClient()
protected DefaultContentManager.HValues getHeaderValues()
Copyright © 2018. All rights reserved.