Example usage for com.amazonaws.services.simpledb.model NoSuchDomainException NoSuchDomainException

List of usage examples for com.amazonaws.services.simpledb.model NoSuchDomainException NoSuchDomainException

Introduction

In this page you can find the example usage for com.amazonaws.services.simpledb.model NoSuchDomainException NoSuchDomainException.

Prototype

public NoSuchDomainException(String message) 

Source Link

Document

Constructs a new NoSuchDomainException with the specified error message.

Usage

From source file:org.apache.camel.component.aws.sdb.AmazonSDBClientMock.java

License:Apache License

@Override
public void deleteAttributes(DeleteAttributesRequest deleteAttributesRequest)
        throws AmazonServiceException, AmazonClientException {
    this.deleteAttributesRequest = deleteAttributesRequest;

    String domainName = deleteAttributesRequest.getDomainName();
    if ("MissingDomain".equals(domainName)) {
        throw new NoSuchDomainException(domainName);
    }/*from  w  w  w  . j a v  a2 s  .  c om*/
}

From source file:org.apache.camel.component.aws.sdb.AmazonSDBClientMock.java

License:Apache License

@Override
public DomainMetadataResult domainMetadata(DomainMetadataRequest domainMetadataRequest)
        throws AmazonServiceException, AmazonClientException {
    this.domainMetadataRequest = domainMetadataRequest;

    if ("NonExistingDomain".equals(domainMetadataRequest.getDomainName())) {
        throw new NoSuchDomainException("Domain 'NonExistingDomain' doesn't exist.");
    }//from  w ww  . jav  a2  s .  co m

    DomainMetadataResult result = new DomainMetadataResult();
    result.setTimestamp(new Integer(10));
    result.setItemCount(new Integer(11));
    result.setAttributeNameCount(new Integer(12));
    result.setAttributeValueCount(new Integer(13));
    result.setAttributeNamesSizeBytes(new Long(1000000));
    result.setAttributeValuesSizeBytes(new Long(2000000));
    result.setItemNamesSizeBytes(new Long(3000000));
    return result;
}