Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;

import java.util.concurrent.atomic.AtomicInteger;

public class Main {
    private static AtomicInteger index = new AtomicInteger(0);

    public static ObjectName getObjectName(String name) throws MalformedObjectNameException {
        return new ObjectName(
                String.format("com.telecom.ctu.platform:upns-monitor=%s-%s", name, index.incrementAndGet()));
    }
}