All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rabbitmq.jms.util.Util Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
/* Copyright (c) 2013-2020 VMware, Inc. or its affiliates. All rights reserved. */
package com.rabbitmq.jms.util;

import java.util.UUID;

/**
 * Utility class which generates unique string identifiers.
 */
public final class Util {
    /**
     * Generates a UUID string identifier.
     * @param prefix - prefix of uniquely generated string; may be null, in which case “null” is the prefix used.
     * @return a UUID string with given prefix
     */
    public static final String generateUUID(String prefix) {
        return new StringBuilder().append(prefix).append(UUID.randomUUID()).toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy