Creates a new {@link Agent} with provided identifier
@param ag a {@link QualifiedName} for the agent
@return an object of type {@link Agent}
421256
public Agent newAgent(QualifiedName ag) {
	Agent res = of.createAgent();
	res.setId(ag);
	return res;
    }
578248
protected Signer createSigner(final Request<?> request,
                                  final String bucketName,
                                  final String key,
                                  final boolean isAdditionalHeadRequestToFindRegion) {

        // Instead of using request.getEndpoint() for this parameter, we use endpoint which is because
        // in accelerate mode, the endpoint in request is regionless. We need the client-wide endpoint
        // to fetch the region information and pick the correct signer.
        URI uri = clientOptions.isAccelerateModeEnabled() ? endpoint : request.getEndpoint();
        final Signer signer = getSignerByURI(uri);

        if(this.awsCredentialsProvider.getCredentials() instanceof IBMOAuthCredentials) {
        	IBMOAuthCredentials oAuthCreds = (IBMOAuthCredentials)this.awsCredentialsProvider.getCredentials();
    		if (oAuthCreds.getApiKey() != null || oAuthCreds.getTokenManager() != null) {
            	return new IBMOAuthSigner(clientConfiguration);	
    		}
        }
        
        if (!isSignerOverridden()) {

            if ((signer instanceof AWSS3V4Signer) && bucketRegionShouldBeCached(request)) {

                String region = bucketRegionCache.get(bucketName);
                if (region != null) {
                     // If cache contains the region for the bucket, create an endpoint for the region and
                     // update the request with that endpoint.
                     resolveRequestEndpoint(request, bucketName, key, RuntimeHttpUtils.toUri(RegionUtils.getRegion(region).getServiceEndpoint(S3_SERVICE_NAME), clientConfiguration));
                     return updateSigV4SignerWithRegion((AWSS3V4Signer) signer, region);
                } else if (request.getOriginalRequest() instanceof GeneratePresignedUrlRequest) {
                    return createSigV2Signer(request, bucketName, key);
                } else if (isAdditionalHeadRequestToFindRegion) {
                    return updateSigV4SignerWithRegion((AWSS3V4Signer) signer, "us-east-1");
                }
            }

            String regionOverride = getSignerRegionOverride();
            if (regionOverride != null) {
                return updateSigV4SignerWithRegion(new AWSS3V4Signer(), regionOverride);
            }
        }
        if (signer instanceof S3Signer) {
            // The old S3Signer needs a method and path passed to its
            // constructor; if that's what we should use, getSigner()
            // will return a dummy instance and we need to create a
            // new one with the appropriate values for this request.
            return createSigV2Signer(request, bucketName, key);
        }

        return signer;
    }
447756
public static void createAgent (
        ClientObject target, int arg1)
    {
        sendNotification(
            target, BureauDecoder.RECEIVER_CODE, BureauDecoder.CREATE_AGENT,
            new Object[] { Integer.valueOf(arg1) });
    }
477247
def agent_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/agents"
        return self.call(api_path, method="POST", data=data, **kwargs)
572631
private void addAgent(AsteriskAgentImpl agent)
    {
        synchronized (agents)
        {
            agents.put(agent.getAgentId(), agent);
        }
        server.fireNewAgent(agent);
    }
16011
protected void agentCreated (ClientObject client, int agentId)
    {
        FoundAgent found = resolve(client, agentId, "agentCreated");
        if (found == null) {
            return;
        }

        log.info("Agent creation confirmed", "agent", found.agent.which());

        if (found.state == AgentState.STARTED) {
            found.bureau.agentStates.put(found.agent, AgentState.RUNNING);
            found.agent.setClientOid(client.getOid());

        } else if (found.state == AgentState.STILL_BORN) {
            // TODO: have a timeout for this in case the client is misbehaving or hung
            BureauSender.destroyAgent(found.bureau.clientObj, agentId);
            found.bureau.agentStates.put(found.agent, AgentState.DESTROYED);

        } else if (found.state == AgentState.PENDING ||
            found.state == AgentState.RUNNING ||
            found.state == AgentState.DESTROYED) {
            log.warning("Ignoring confirmation of creation of an agent in an unexpected state",
                        "state", found.state, "agent", found.agent.which());
        }

        found.bureau.summarize();
    }
293455
public CreateSingleRequestBuilder<T,ID> create(T item)
    {
        return new CreateSingleRequestBuilder<>(version,type,entityName,item);
    }
440487
public static void applyUserAgent(String agent) {
    LOGGER.info("Applying agent: " + agent);
    System.setProperty("http.agent", agent);
    System.setProperty("https.agent", agent);
  }
58850
protected synchronized void createAgent (int agentId)
    {
        Subscriber<AgentObject> delegator = new Subscriber<AgentObject>() {
            public void objectAvailable (AgentObject agentObject) {
                BureauDirector.this.objectAvailable(agentObject);
            }
            public void requestFailed (int oid, ObjectAccessException cause) {
                BureauDirector.this.requestFailed(oid, cause);
            }
        };

        log.info("Subscribing to object " + agentId);

        SafeSubscriber<AgentObject> subscriber =
            new SafeSubscriber<AgentObject>(agentId, delegator);
        _subscribers.put(agentId, subscriber);
        subscriber.subscribe(_ctx.getDObjectManager());
    }
963718
public Entity newEntity(QualifiedName id) {
	Entity res = of.createEntity();
	res.setId(id);
	return res;
    }
540073
public void registerShanksAgent(ShanksAgent agent)
            throws ShanksException {
        if (!this.agents.containsKey(agent.getID())) {
            this.agents.put(agent.getID(), agent);
        } else {
            throw new DuplicatedAgentIDException(agent.getID());
        }
    }
461326
@XmlElementDecl(namespace = PROV_NS, name = "agent")
    public JAXBElement<Agent> createAgent(Agent value) {
        return new JAXBElement<Agent>(_Agent_QNAME, Agent.class, null, value);
    }
1055568
public QualifiedName newQualifiedName(javax.xml.namespace.QName qname) {
	return newQualifiedName(qname.getNamespaceURI(), qname.getLocalPart(), qname.getPrefix());
    }
648495
public static BeanId create(final String instanceId, final String schemaName) {
        if (instanceId == null || "".equals(instanceId)) {
            throw CFG107_MISSING_ID();
        }
        return new BeanId(instanceId, schemaName);
    }
284176
public static String getGrpcUserAgent(
      String transportName, @Nullable String applicationUserAgent) {
    StringBuilder builder = new StringBuilder();
    if (applicationUserAgent != null) {
      builder.append(applicationUserAgent);
      builder.append(' ');
    }
    builder.append("grpc-java-");
    builder.append(transportName);
    builder.append('/');
    builder.append(IMPLEMENTATION_VERSION);
    return builder.toString();
  }
625589
public static Map<String, Object> createFormParamClientCredentialsGrantType(String scope) {
        Map<String, Object> formParams = new HashMap<>();
        formParams.put("grant_type", "client_credentials");
        if (scope != null) {
            formParams.put("scope", scope);
        }
        return formParams;
    }
533873
function Agent(consul) {
  this.consul = consul;
  this.check = new Agent.Check(consul);
  this.service = new Agent.Service(consul);
}