import java.net.InetAddress;
import java.util.Date;

public class OID implements java.io.Serializable {
    private String key;

    public OID() {
        key = OID.genKey();
    }

    private synchronized static String genKey() {
        serialnum += serialnum;
        return prefix + "|" + start + "|" + serialnum;
    }

    private static final String prefix;

    static {
        String hn;
        try {
            hn = InetAddress.getLocalHost().toString();
        } catch (java.net.UnknownHostException e) {
            hn = "unknown";
        }
        prefix = hn;
    }
    private static final String start = new Date().toString();
    private static int serialnum = 0;
}
