class FileWMSEnvoy extends AbstractEnvoy {

    @Override
    public void open()
    {
        // TODO read from configuration
        final int numLayers = 5;
        final float initialSize = 45f;

        // TODO configuration should be read, not created
        WMSLayerConfig conf = new WMSLayerConfig();
        conf.setLayerTitle("BlueMarble");
        String layerName = FileWMSLayer.class.getName() + ":" + getBaseDir();
        conf.setLayerName(layerName);
        conf.setLayerKey(layerName);
        conf.setCacheImageFormat(MimeType.DDS.getMimeType());

        WMSDataTypeInfo info = new WMSDataTypeInfo(getToolbox(), (Preferences)null, "FileWMS",
                new WMSLayerConfigurationSet(null, conf, null), conf.getLayerKey(), conf.getLayerTitle());
        FileWMSLayer.Builder builder = new FileWMSLayer.Builder(info);
        builder.setLRCImageProvider(myFileSystemImageProvider);
        builder.setLayerCellDimensions(createLayerCellDimensions(numLayers, initialSize));
        WMSLayer blueMarbleLayer = new FileWMSLayer(builder);

        String source = FileWMSEnvoy.class.getName() + ":" + myBaseDir;
        String family = WMSLayer.class.getName();
        String category = "";
        Date expiration = CacheDeposit.SESSION_END;

        Collection<? extends PropertyAccessor<WMSLayer, ?>> accessors = Collections
                .singleton(UnserializableAccessor.getHomogeneousAccessor(WMSLayer.PROPERTY_DESCRIPTOR));
        CacheDeposit<? extends WMSLayer> deposit = new DefaultCacheDeposit<WMSLayer>(
                new DataModelCategory(source, family, category), accessors, Collections.singleton(blueMarbleLayer), true,
                expiration, true);
        getDataRegistry().addModels(deposit);
    }

    public  FileWMSEnvoy(Toolbox toolbox, String baseDir, String fileExtension);
    protected  FileWMSEnvoy(Toolbox toolbox);

}