Efficiently returning the string basis on current datacenter
final is meaningless on static methods :

private static final String getHostNameOfServer() {


For the following :

// below if else, looks pretty  odd, may be it can be improved better?
if (f.equals(FlowTypeEnum.DEVICEFLOW)) {
    prefix = "/testdevice";
} else if (f.equals(FlowTypeEnum.USERFLOW)) {
    prefix = "/test";
}


there are 2 alternatives


make a getPrefix() method on FlowTypeEnum, reducing the above code to :

prefix = f.getPrefix();

FlowTypeEnum could then look like this :

public enum FlowTypeEnum {
    USERFLOW("/test"), DEVICEFLOW("/testdevice");

    private final String prefix;

    FlowTypeEnum(String prefix) {
        this.prefix = prefix;
    }

    public String getPrefix() {
        return prefix;
    }
}

make a map that maps the the FlowTypeEnum instances to a prefix, reducing the above code to :

prefix = mapToPrefix.get(f);


In both cases you might even inline the prefix variable.

Try to make code resistant to likely changes. In this case, server names and paths are likely to change. Pull these from config files.

All these static methods don't seem to be at home on the DatacenterEnum, they don't really operate on DatacenterEnum instances. Perhaps they need to find a home on a new class, where they can be non static.

It is unwise to hard code the data centers as enum instances. It simply won't scale. Renaming, removing or adding data centers in the field will require a new release.

Use more meaningful names for variables : 


dc -> dataCenter
f -> flowType


Replace this :

currenthost.indexOf(namepart) &gt;= 0


by the more readable :

currenthost.contains(namepart)