class SwiftWriteFeature extends AbstractHttpWriteFeature<StorageObject> implements Write<StorageObject> {

    @Override
    public HttpResponseOutputStream<StorageObject> write(final Path file, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {
        // Submit store run to background thread
        final DelayedHttpEntityCallable<StorageObject> command = new DelayedHttpEntityCallable<StorageObject>() {
            /**
             * @return The ETag returned by the server for the uploaded object
             */
            @Override
            public StorageObject call(final AbstractHttpEntity entity) throws BackgroundException {
                try {
                    // Previous
                    final HashMap<String, String> headers = new HashMap<>(status.getMetadata());
                    final Checksum checksum = status.getChecksum();
                    final String etag = session.getClient().storeObject(
                        regionService.lookup(file),
                        containerService.getContainer(file).getName(), containerService.getKey(file),
                        entity, headers, checksum.algorithm == HashAlgorithm.md5 ? checksum.hash : null);
                    if(log.isDebugEnabled()) {
                        log.debug(String.format("Saved object %s with checksum %s", file, etag));
                    }
                    final StorageObject stored = new StorageObject(containerService.getKey(file));
                    stored.setMd5sum(etag);
                    stored.setSize(status.getLength());
                    return stored;
                }
                catch(GenericException e) {
                    throw new SwiftExceptionMappingService().map("Upload {0} failed", e, file);
                }
                catch(IOException e) {
                    throw new DefaultIOExceptionMappingService().map("Upload {0} failed", e, file);
                }
            }

            @Override
            public long getContentLength() {
                return status.getLength();
            }
        };
        return this.write(file, status, command);
    }

    public  SwiftWriteFeature(final SwiftSession session, final SwiftRegionService regionService);
    public  SwiftWriteFeature(final SwiftSession session, final SwiftRegionService regionService,
                             final SwiftObjectListService listService,
                             final SwiftSegmentService segmentService);
    public  SwiftWriteFeature(final SwiftSession session, final SwiftRegionService regionService,
                             final SwiftObjectListService listService,
                             final SwiftSegmentService segmentService, final Find finder);
    public  SwiftWriteFeature(final SwiftSession session, final SwiftRegionService regionService,
                             final SwiftObjectListService listService,
                             final SwiftSegmentService segmentService,
                             final Find finder, final AttributesFinder attributes);

}