Search in sources :

Example 1 with IDebuggerTemplateListener

use of com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebuggerTemplateListener in project binnavi by google.

the class DebuggerTemplate method setName.

/**
   * Changes the name of the debugger template.
   *
   * @param name The new name of the debugger template.
   *
   * @throws CouldntSaveDataException Thrown if the name of the debugger template could not be
   *         updated.
   */
public void setName(final String name) throws CouldntSaveDataException {
    Preconditions.checkNotNull(name, "IE00803: Name argument can not be null");
    if (debuggerTemplateName.equals(name)) {
        return;
    }
    sqlProvider.setName(this, name);
    debuggerTemplateName = name;
    for (final IDebuggerTemplateListener listener : listeners) {
        try {
            listener.changedName(this);
        } catch (final Exception e) {
            CUtilityFunctions.logException(e);
        }
    }
}
Also used : IDebuggerTemplateListener(com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebuggerTemplateListener) CouldntSaveDataException(com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)

Example 2 with IDebuggerTemplateListener

use of com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebuggerTemplateListener in project binnavi by google.

the class DebuggerTemplate method setPort.

/**
   * Updates the port of the debug client.
   *
   * @param port The new debug client port.
   *
   * @throws CouldntSaveDataException Thrown if the port could not be updated.
   */
public void setPort(final int port) throws CouldntSaveDataException {
    Preconditions.checkArgument(NetHelpers.isValidPort(port), "IE00804: Invalid port");
    if (debugClientPort == port) {
        return;
    }
    sqlProvider.setPort(this, port);
    debugClientPort = port;
    for (final IDebuggerTemplateListener listener : listeners) {
        try {
            listener.changedPort(this);
        } catch (final Exception e) {
            CUtilityFunctions.logException(e);
        }
    }
}
Also used : IDebuggerTemplateListener(com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebuggerTemplateListener) CouldntSaveDataException(com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)

Example 3 with IDebuggerTemplateListener

use of com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebuggerTemplateListener in project binnavi by google.

the class DebuggerTemplate method setHost.

/**
   * Sets the host of the debug client.
   *
   * @param host The host of the debug client.
   *
   * @throws CouldntSaveDataException Thrown if the debug host could not be updated.
   */
public void setHost(final String host) throws CouldntSaveDataException {
    Preconditions.checkNotNull(host, "IE00802: Host argument can not be null");
    if (debugClientHost.equals(host)) {
        return;
    }
    sqlProvider.setHost(this, host);
    debugClientHost = host;
    for (final IDebuggerTemplateListener listener : listeners) {
        try {
            listener.changedHost(this);
        } catch (final Exception e) {
            CUtilityFunctions.logException(e);
        }
    }
}
Also used : IDebuggerTemplateListener(com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebuggerTemplateListener) CouldntSaveDataException(com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)

Aggregations

CouldntSaveDataException (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)3 IDebuggerTemplateListener (com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebuggerTemplateListener)3