Examples of StorageProvider


Examples of org.apache.james.mime4j.storage.StorageProvider

     * Creates a binary part from the specified image.
     */
    private static BodyPart createImagePart(StorageBodyFactory bodyFactory,
            BufferedImage image) throws IOException {
        // Create a binary message body from the image
        StorageProvider storageProvider = bodyFactory.getStorageProvider();
        Storage storage = storeImage(storageProvider, image, "png");
        BinaryBody body = bodyFactory.binaryBody(storage);

        // Create a body part with the correct MIME-type and transfer encoding
        BodyPart bodyPart = new BodyPart();
View Full Code Here

Examples of org.apache.james.mime4j.storage.StorageProvider

    private static final String HOSTNAME = "localhost";

    public static void main(String[] args) throws Exception {
        // Explicitly set a strategy for storing body parts. Usually not
        // necessary; for most applications the default setting is appropriate.
        StorageProvider storageProvider = new TempFileStorageProvider();
        DefaultStorageProvider.setInstance(storageProvider);

        // Create a template message. It would be possible to load a message
        // from an input stream but for this example a message object is created
        // from scratch for demonstration purposes.
View Full Code Here

Examples of org.apache.james.mime4j.storage.StorageProvider

     * Creates a binary part from the specified image.
     */
    private static BodyPart createImagePart(BodyFactory bodyFactory,
            BufferedImage image) throws IOException {
        // Create a binary message body from the image
        StorageProvider storageProvider = bodyFactory.getStorageProvider();
        Storage storage = storeImage(storageProvider, image, "png");
        BinaryBody body = bodyFactory.binaryBody(storage);

        // Create a body part with the correct MIME-type and transfer encoding
        BodyPart bodyPart = new BodyPart();
View Full Code Here

Examples of org.apache.james.mime4j.storage.StorageProvider

    private static final String HOSTNAME = "localhost";

    public static void main(String[] args) throws Exception {
        // Explicitly set a strategy for storing body parts. Usually not
        // necessary; for most applications the default setting is appropriate.
        StorageProvider storageProvider = new TempFileStorageProvider();
        DefaultStorageProvider.setInstance(storageProvider);

        // Create a template message. It would be possible to load a message
        // from an input stream but for this example a message object is created
        // from scratch for demonstration purposes.
View Full Code Here

Examples of org.apache.vysper.storage.StorageProvider

            for (ServerRuntimeContextService serverRuntimeContextService : serviceList) {
                registerServerRuntimeContextService(serverRuntimeContextService);
               
                // if a storage service, also register there
                if (serverRuntimeContextService instanceof StorageProvider) {
                    StorageProvider storageProvider = (StorageProvider) serverRuntimeContextService;
                    storageProviderRegistry.add(storageProvider);
                }
            }
        }
View Full Code Here

Examples of org.apache.vysper.storage.StorageProvider

        dictionary.add(new RosterDictionary());
    }

    @Override
    public void initialize(ServerRuntimeContext serverRuntimeContext) {
        StorageProvider storageProvider = serverRuntimeContext.getStorageProvider(RosterManager.class);
        if (storageProvider == null) {
            logger.error("no roster storage provider found");
        }
    }
View Full Code Here

Examples of org.apache.vysper.storage.StorageProvider

        dictionary.add(new RosterDictionary());
    }

    @Override
    public void initialize(ServerRuntimeContext serverRuntimeContext) {
        StorageProvider storageProvider = serverRuntimeContext.getStorageProvider(RosterManager.class);
        if (storageProvider == null) {
            logger.error("no roster storage provider found");
        }
    }
View Full Code Here

Examples of org.apache.vysper.storage.StorageProvider

            for (ServerRuntimeContextService serverRuntimeContextService : serviceList) {
                registerServerRuntimeContextService(serverRuntimeContextService);

                // if a storage service, also register there
                if (serverRuntimeContextService instanceof StorageProvider) {
                    StorageProvider storageProvider = (StorageProvider) serverRuntimeContextService;
                    storageProviderRegistry.add(storageProvider);
                }
            }
        }
View Full Code Here

Examples of org.apache.vysper.storage.StorageProvider

            for (ServerRuntimeContextService serverRuntimeContextService : serviceList) {
                registerServerRuntimeContextService(serverRuntimeContextService);

                // if a storage service, also register there
                if (serverRuntimeContextService instanceof StorageProvider) {
                    StorageProvider storageProvider = (StorageProvider) serverRuntimeContextService;
                    storageProviderRegistry.add(storageProvider);
                }
            }
        }
View Full Code Here

Examples of org.eobjects.analyzer.storage.StorageProvider

        WidgetUtils.addToGridBag(new JLabel("" + numThreads), panel, 1, row);
      }
    }

    row++;
    StorageProvider storageProvider = _configuration.getStorageProvider();
    WidgetUtils.addToGridBag(new JLabel("Storage provider type:"), panel, 0, row);
    WidgetUtils.addToGridBag(new JLabel(storageProvider.getClass().getSimpleName()), panel, 1, row);
    WidgetUtils
        .addToGridBag(
            new HelpIcon(
                "The storage provider is used for staging data during and after analysis, typically to store the results on disk in stead of holding everything in memory."),
            panel, 2, row);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.