Have a look at the Singleton-Pattern and/or the Flyweight-Pattern
I would recommend implementing it as Singleton and provide an exists method.
public class SingletonDemo {
private static volatile SingletonDemo instance = null;
private SingletonDemo() { }
public static SingletonDemo getInstance() {
if (instance == null) {
synchronized (SingletonDemo .class){
if (instance == null) {
instance = new SingletonDemo ();
}
}
}
return instance;
}
public boolean exists() {
return instance != null;
}
}