# setResource method

1. @visibleForTesting

void setResource(

1. String resource,
2. {bool triggerEvent = true}

)

Sets the resource of the connection

## Implementation

    @visibleForTesting
    void setResource(String resource, {bool triggerEvent = true}) {
      _log.finest('Updating _resource to $resource');
      _resource = resource;

      if (triggerEvent) {
        _sendEvent(ResourceBoundEvent(resource));
      }
    }