--- ADD A REMOTE SERVICE ---
481890
@Override
	public void addActions(String nodeID, Tree config) {
		Tree actions = config.get("actions");
		String serviceName = config.get("name", "");
		int actionCounter = 0;

		final long stamp = lock.writeLock();
		try {
			if (actions != null && actions.isMap()) {
				for (Tree actionConfig : actions) {
					actionConfig = actionConfig.clone();
					actionConfig.putObject("nodeID", nodeID, true);
					String actionName = actionConfig.get("name", "");

					// Register remote action
					RemoteActionEndpoint endpoint = new RemoteActionEndpoint(this, transporter, nodeID, actionConfig,
							actionName);
					Strategy<ActionEndpoint> actionStrategy = strategies.get(actionName);
					if (actionStrategy == null) {
						actionStrategy = strategyFactory.create();
						strategies.put(actionName, actionStrategy);
					}
					actionStrategy.addEndpoint(endpoint);

					// Apply middlewares
					for (Middleware middleware : middlewares) {
						endpoint.use(middleware);
					}

					// Write log about this action
					logger.info("Action \"" + actionName + "\" on node \"" + nodeID + "\" registered.");
					actionCounter++;
				}
			}
			names.add(serviceName);
		} finally {
			lock.unlockWrite(stamp);
		}

		// Write log about this service
		StringBuilder msg = new StringBuilder(64);
		msg.append("Remote service \"");
		msg.append(serviceName);
		msg.append("\" registered ");
		if (actionCounter == 0) {
			msg.append("without any actions");
		} else if (actionCounter == 1) {
			msg.append("with 1 action");
		} else {
			msg.append("with ");
			msg.append(actionCounter);
			msg.append(" actions");
		}
		msg.append(" on node \"");
		msg.append(nodeID);
		msg.append("\".");
		logger.info(msg.toString());

		// Notify local listeners about the new REMOTE service
		broadcastServicesChanged(false);
	}
628249
@Override
    protected S addService(S service, ServiceProperties props) {
        if (reference.compareAndSet(null, service)) {
            return service;
        }
        return null;
    }
711959
def add_service_server(service_server)
      @master.register_service(service_server.service_name,
                               service_server.service_uri)
      service_server.set_manager(self)
      @service_servers.push(service_server)
      service_server
    end
791969
@Override
	public void addInputChannel(RemoteInputChannel listener) throws IOException {
		checkError();

		inputChannels.putIfAbsent(listener.getInputChannelId(), listener);
	}
308941
function()
    {
        var _this = this;

        _(api.services).each(function(service, key) {
            _this._addService(service);
        });
    }
83936
def add_service(self, zeroconf, service_type, name):
        """"""
        self.lock.acquire()
        try:
            self._internal_add(zeroconf, service_type, name)
        finally:
            self.lock.release()
520216
def addToService(self, service, namespace=None, seperator='.'):
        
        if namespace is None:
            namespace = []
        if isinstance(namespace, basestring):
            namespace = [namespace]

        for n, m in inspect.getmembers(self, inspect.ismethod):
            if hasattr(m, 'export_rpc'):
                try:
                    name = seperator.join(namespace + m.export_rpc)
                except TypeError:
                    name = seperator.join(namespace + [m.export_rpc])
                service.add(m, name)
1033583
def add_service(self, service_name):
        
        if service_name not in self.manifest['services']:
            self.manifest['services'].append(service_name)
226133
protected void remoteInit() throws JMSException
    {
        CreateConsumerQuery query = new CreateConsumerQuery();
        query.setConsumerId(id);
        query.setSessionId(session.getId());
        query.setDestination(destination);
        query.setMessageSelector(messageSelector);
        query.setNoLocal(noLocal);
        transportEndpoint.blockingRequest(query);        
    }
1366028
def add_service(self, service):
        
        if service.protocol in self._services:
            existing = self._services[service.protocol]
            if not existing.superseeded_by(service):
                return

        self._services[service.protocol] = service
309617
function (jid, service) {
        var that = this._connection;
        if (service === undefined) {
            service = jid;
            jid = undefined;
        }
        this.jid = jid || that.jid;
        this.service = service || null;
        this._autoService = false;
    }
412918
public GrpcServerBuilder addService(ServiceType serviceType, GrpcService serviceDefinition) {
    mServices.add(serviceType);
    return addService(serviceDefinition);
  }
1370638
function (item) {
        /* istanbul ignore if */
        // The persistence service should always be set before calling this method.
        // This check is an additional precaution.
        if (!__private.provider) {
            log.error('Unable to perform remote operation. The persistence service has not been set');
            return;
        }

        if (item.value instanceof Array) {
            item.value.forEach(function (e) {
                updateRemoteItem(e);
            });
        } else if (item !== undefined && item.type !== undefined) {
            const url = __private.provider + '/' + appName + '/' + _convertKey(item.key);
            if (item.value === undefined) {
                request.delete(url, _handleRequestError);
            } else {
                request.post(url, {
                    headers: { 'Content-Type': Constants.HTTP_CONTENT_TYPE_JSON },
                    json: { value: item.value, type: item.type, timestamp: item.timestamp }
                }, _handleRequestError);
            }
        }
    }
1161371
async function addRemote(name, url) {
  try {
    await exec(`git remote add ${name} ${url}`);
    logger.log(`Added remote to ${name}`);
  } catch (error) {
    throw error;
  }
}
244327
@Override
    public void activate() throws InterruptedException, CouldNotPerformException {
        synchronized (maintainerLock) {

            // Duplicated activation filter.
            if (isActive()) {
                return;
            }

            try {
                verifyMaintainability();
                validateInitialization();
                setConnectionState(CONNECTING);
                remoteServerWatchDog.activate();
                listenerWatchDog.activate();
            } catch (CouldNotPerformException ex) {
                throw new InvalidStateException("Could not activate remote service!", ex);
            }
        }
    }
247335
def add_remote(name, url)
      @remotes[name] = Remote::Git.new(self, name, url)
      @remotes[name].add
    end
423613
def add_service_port(service, port):
    '''
    
    '''
    if service not in get_services(permanent=True):
        raise CommandExecutionError('The service does not exist.')

    cmd = '--permanent --service={0} --add-port={1}'.format(service, port)
    return __firewall_cmd(cmd)