Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.intel.cosbench.client.amplistor
Class AmpliClient

    java.lang.Object
      com.intel.cosbench.client.amplistor.AmpliClient

    public class AmpliClient

extends java.lang.Object

This class encapsulates amplistor related REST operations, so far no authentication supported.

Author:
  ywang19

Constructor Summary
`AmpliClient(org.apache.http.client.HttpClient client, java.lang.String host, int port, java.lang.String nsRoot)`

Method Summary
`AmpliNamespace` | `createNamespace(AmpliNamespace namespace)`
`java.lang.String` | `createNamespace(java.lang.String namespace, java.lang.String policy_id)`
`AmpliPolicy` | `createPolicy(AmpliPolicy policy)`
`boolean` | `deleteNamespace(java.lang.String namespace)`
`boolean` | `deleteObject(java.lang.String ampliNamespace, java.lang.String name)`
`void` | `dispose()`
`static java.lang.String` | `encodeURL(java.lang.String str)`
`AmpliNamespace` | `getNamespace(java.lang.String name)`
`byte[]` | `getObject(java.lang.String namespace, java.lang.String objName)`
`java.io.InputStream` | `getObjectAsStream(java.lang.String namespace, java.lang.String objName)`
`java.util.Map<java.lang.String,java.lang.String>` | `getObjectMetadata(java.lang.String namespace, java.lang.String objName)`
`AmpliPolicy` | `getPolicy(java.lang.String policyId)`
`boolean` | `isNamespaceExisted(java.lang.String name)`
`boolean` | `login()`
`java.lang.String` | `StoreObject(byte[] data, java.lang.String ampliNamespace, java.lang.String ampliFilename)`
`java.lang.String` | `StoreObject(java.lang.String sourceFilename, java.lang.String ampliNamespace, java.lang.String ampliFilename)`
`void` | `storeObjectMetadata(java.lang.String namespace, java.lang.String objName, java.util.Map<java.lang.String,java.lang.String> map)`
`java.lang.String` | `StoreStreamedObject(java.io.InputStream stream, long length, java.lang.String ampliNamespace, java.lang.String ampliFilename)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AmpliClient

    public AmpliClient(org.apache.http.client.HttpClient client,
                       java.lang.String host,
                       int port,
                       java.lang.String nsRoot)

Method Detail

### dispose

    public void dispose()

### login

    public boolean login()
                  throws java.io.IOException,
                         org.apache.http.HttpException

  Throws:
    `java.io.IOException`
    `org.apache.http.HttpException`

### encodeURL

    public static java.lang.String encodeURL(java.lang.String str)

### StoreObject

    public java.lang.String StoreObject(java.lang.String sourceFilename,
                                        java.lang.String ampliNamespace,
                                        java.lang.String ampliFilename)
                                 throws java.io.IOException,
                                        org.apache.http.HttpException,
                                        AmpliException

  Throws:
    `java.io.IOException`
    `org.apache.http.HttpException`
    `AmpliException`

### StoreStreamedObject

    public java.lang.String StoreStreamedObject(java.io.InputStream stream,
                                                long length,
                                                java.lang.String ampliNamespace,
                                                java.lang.String ampliFilename)
                                         throws java.io.IOException,
                                                org.apache.http.HttpException,
                                                AmpliException

  Throws:
    `java.io.IOException`
    `org.apache.http.HttpException`
    `AmpliException`

### StoreObject

    public java.lang.String StoreObject(byte[] data,
                                        java.lang.String ampliNamespace,
                                        java.lang.String ampliFilename)
                                 throws java.io.IOException,
                                        org.apache.http.HttpException,
                                        AmpliException

  Throws:
    `java.io.IOException`
    `org.apache.http.HttpException`
    `AmpliException`

### getObject

    public byte[] getObject(java.lang.String namespace,
                            java.lang.String objName)
                     throws java.io.IOException,
                            org.apache.http.HttpException,
                            AmpliException

  Throws:
    `java.io.IOException`
    `org.apache.http.HttpException`
    `AmpliException`

### getObjectAsStream

    public java.io.InputStream getObjectAsStream(java.lang.String namespace,
                                                 java.lang.String objName)
                                          throws java.io.IOException,
                                                 org.apache.http.HttpException,
                                                 AmpliException

  Throws:
    `java.io.IOException`
    `org.apache.http.HttpException`
    `AmpliException`

### deleteObject

    public boolean deleteObject(java.lang.String ampliNamespace,
                                java.lang.String name)
                         throws org.apache.http.HttpException,
                                java.io.IOException,
                                AmpliException

  Throws:
    `org.apache.http.HttpException`
    `java.io.IOException`
    `AmpliException`

### createPolicy

    public AmpliPolicy createPolicy(AmpliPolicy policy)
                             throws org.apache.http.HttpException,
                                    java.io.IOException,
                                    AmpliException

  Throws:
    `org.apache.http.HttpException`
    `java.io.IOException`
    `AmpliException`

### getPolicy

    public AmpliPolicy getPolicy(java.lang.String policyId)
                          throws org.apache.http.HttpException,
                                 java.io.IOException,
                                 AmpliException

  Throws:
    `org.apache.http.HttpException`
    `java.io.IOException`
    `AmpliException`

### createNamespace

    public AmpliNamespace createNamespace(AmpliNamespace namespace)
                                   throws org.apache.http.HttpException,
                                          java.io.IOException,
                                          AmpliException

  Throws:
    `org.apache.http.HttpException`
    `java.io.IOException`
    `AmpliException`

### createNamespace

    public java.lang.String createNamespace(java.lang.String namespace,
                                            java.lang.String policy_id)
                                     throws org.apache.http.HttpException,
                                            java.io.IOException,
                                            AmpliException

  Throws:
    `org.apache.http.HttpException`
    `java.io.IOException`
    `AmpliException`

### getNamespace

    public AmpliNamespace getNamespace(java.lang.String name)
                                throws org.apache.http.HttpException,
                                       java.io.IOException,
                                       AmpliException

  Throws:
    `org.apache.http.HttpException`
    `java.io.IOException`
    `AmpliException`

### isNamespaceExisted

    public boolean isNamespaceExisted(java.lang.String name)
                               throws org.apache.http.HttpException,
                                      java.io.IOException,
                                      AmpliException

  Throws:
    `org.apache.http.HttpException`
    `java.io.IOException`
    `AmpliException`

### deleteNamespace

    public boolean deleteNamespace(java.lang.String namespace)
                            throws org.apache.http.HttpException,
                                   java.io.IOException,
                                   AmpliException

  Throws:
    `org.apache.http.HttpException`
    `java.io.IOException`
    `AmpliException`

### getObjectMetadata

    public java.util.Map<java.lang.String,java.lang.String> getObjectMetadata(java.lang.String namespace,
                                                                              java.lang.String objName)
                                                                       throws java.io.IOException,
                                                                              org.apache.http.HttpException,
                                                                              AmpliException

  Throws:
    `java.io.IOException`
    `org.apache.http.HttpException`
    `AmpliException`

### storeObjectMetadata

    public void storeObjectMetadata(java.lang.String namespace,
                                    java.lang.String objName,
                                    java.util.Map<java.lang.String,java.lang.String> map)
                             throws java.io.IOException,
                                    AmpliException

  Throws:
    `java.io.IOException`
    `AmpliException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD