Search in sources :

Example 1 with GuidUse

use of edu.umass.cs.gnsclient.console.commands.GuidUse in project GNS by MobilityFirst.

the class ConsoleModule method useGnsDefaults.

/**
   * Connect and try to find default GNSProtocol.GUID.toString() if defined.
   */
public void useGnsDefaults() {
    GuidEntry guid = KeyPairUtils.getDefaultGuidEntry(getGnsInstance());
    if (guid == null) {
        return;
    }
    try {
        printString("Looking for default GUID: " + guid + "\n");
        new GuidUse(this).parse(guid.getEntityName());
    } catch (Exception e) {
        printString("Couldn't connect default GUID " + guid);
    }
}
Also used : GuidUse(edu.umass.cs.gnsclient.console.commands.GuidUse) GuidEntry(edu.umass.cs.gnsclient.client.util.GuidEntry) JSONException(org.json.JSONException) ClientException(edu.umass.cs.gnscommon.exceptions.client.ClientException) IOException(java.io.IOException) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Aggregations

GuidEntry (edu.umass.cs.gnsclient.client.util.GuidEntry)1 GuidUse (edu.umass.cs.gnsclient.console.commands.GuidUse)1 ClientException (edu.umass.cs.gnscommon.exceptions.client.ClientException)1 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 JSONException (org.json.JSONException)1