org.jclouds.karaf.commands.blobstore
Class BlobStoreCommandSupport
java.lang.Object
org.apache.karaf.shell.console.AbstractAction
org.apache.karaf.shell.console.OsgiCommandSupport
org.jclouds.karaf.commands.blobstore.BlobStoreCommandSupport
- All Implemented Interfaces:
- org.apache.felix.gogo.commands.Action, org.apache.karaf.shell.console.BundleContextAware
- Direct Known Subclasses:
- BlobCreateCommand, BlobDeleteCommand, BlobListCommand, BlobReadCommand, BlobStoreListCommand, BlobWriteCommand
public abstract class BlobStoreCommandSupport
- extends org.apache.karaf.shell.console.OsgiCommandSupport
- Author:
- iocanel
| Fields inherited from class org.apache.karaf.shell.console.OsgiCommandSupport |
bundleContext, usedReferences |
| Fields inherited from class org.apache.karaf.shell.console.AbstractAction |
log, session |
| Methods inherited from class org.apache.karaf.shell.console.OsgiCommandSupport |
execute, getAllServices, getBundleContext, getService, setBundleContext, ungetServices |
| Methods inherited from class org.apache.karaf.shell.console.AbstractAction |
doExecute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROVIDERFORMAT
public static final String PROVIDERFORMAT
- See Also:
- Constant Field Values
provider
protected String provider
BlobStoreCommandSupport
public BlobStoreCommandSupport()
setBlobStoreServices
public void setBlobStoreServices(List<org.jclouds.blobstore.BlobStore> services)
getBlobStoreServices
protected List<org.jclouds.blobstore.BlobStore> getBlobStoreServices()
getBlobStore
protected org.jclouds.blobstore.BlobStore getBlobStore()
read
public Object read(String containerName,
String blobName)
- Reads an Object from the blob store.
- Parameters:
containerName - blobName -
- Returns:
getBlobInputStream
public InputStream getBlobInputStream(String containerName,
String blobName)
- Returns an InputStream to a
Blob.
- Parameters:
containerName - blobName -
- Returns:
write
public void write(String containerName,
String blobName,
Object object)
- Writes to the
Blob by serializing an Object.
- Parameters:
containerName - blobName - object -
write
public void write(String bucket,
String blobName,
InputStream is)
- Writes to the
Blob using an InputStream.
- Parameters:
bucket - blobName - is -
toBytes
public byte[] toBytes(Object object)
readFromUrl
public byte[] readFromUrl(URL url)
- Reads a bye[] from a URL.
- Parameters:
url -
- Returns:
copy
public void copy(InputStream is,
OutputStream os)
- Copies data from
InputStream to OutputStream.
- Parameters:
is - Source InputStream.os - Target OutputStream.
printBlobStoreProviders
protected void printBlobStoreProviders(List<org.jclouds.blobstore.BlobStore> blobStores,
String indent,
PrintStream out)
getContainerCache
public Set<String> getContainerCache()
setContainerCache
public void setContainerCache(Set<String> containerCache)
getBlobCache
public Set<String> getBlobCache()
setBlobCache
public void setBlobCache(Set<String> blobCache)
Copyright © 2009-2012 jclouds. All Rights Reserved.