Examples of Endpoint


Examples of at.newmedialab.ldclient.model.Endpoint

     * @return a Sesame in-memory repository containing the triples for this resource
     */
    public ClientResponse retrieveResource(URI resource) throws LDClientException {
        HttpResponse response = null;
        try {
            Endpoint endpoint = ldEndpoints.getEndpoint(resource);

            if(endpoint != null && endpoint.getType() == Endpoint.EndpointType.NONE) {
                return null;
            } else if(endpoint != null) {
                response = retrieveFromEndpoint(resource,endpoint);
                return parseResponse(resource,response,endpoint);
            } else if(config.getBoolean("fallback",true)) {
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.util.doc.Endpoint

  public static String createDocumentation(String endpointUrl) {
    EndpointDocumentation docs = new EndpointDocumentation(endpointUrl, "sqldirectoryprovider");
    docs.setTitle("Weblounge SQL Directory Provider");

    // GET /
    Endpoint getStatus = new Endpoint("/", Method.GET, "status");
    getStatus.setDescription("Returns the directory provider status");
    getStatus.addFormat(Format.xml());
    getStatus.addStatus(ok("status has been sent back to the client"));
    getStatus.addStatus(notFound("the site does not exist"));
    getStatus.addStatus(serviceUnavailable("the site is temporarily offline"));
    getStatus.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getStatus);

    // PUT /status
    Endpoint enableSiteLogins = new Endpoint("/status", Method.PUT, "enable");
    enableSiteLogins.setDescription("Enables login to the site");
    enableSiteLogins.addFormat(Format.xml());
    enableSiteLogins.addStatus(ok("site logins have been enabled"));
    enableSiteLogins.addStatus(notModified("site logins were already enabled"));
    enableSiteLogins.addStatus(notFound("the site does not exist"));
    enableSiteLogins.addStatus(serviceUnavailable("the site is temporarily offline"));
    enableSiteLogins.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, enableSiteLogins);

    // DELETE /status
    Endpoint disableSiteLogins = new Endpoint("/status", Method.DELETE, "disable");
    disableSiteLogins.setDescription("Disables login to the site");
    disableSiteLogins.addFormat(Format.xml());
    disableSiteLogins.addStatus(ok("site logins have been disabled"));
    disableSiteLogins.addStatus(notModified("site logins were already disabled"));
    disableSiteLogins.addStatus(notFound("the site does not exist"));
    disableSiteLogins.addStatus(serviceUnavailable("the site is temporarily offline"));
    disableSiteLogins.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, disableSiteLogins);

    // POST /account
    Endpoint createAccount = new Endpoint("/account", Method.POST, "createaccount");
    createAccount.setDescription("Creates a new account in this site");
    createAccount.addFormat(Format.xml());
    createAccount.addStatus(created("the account has been created and the account's location is part of the response"));
    createAccount.addStatus(conflict("an account with that login already exists"));
    createAccount.addStatus(badRequest("the login is malformed or empty"));
    createAccount.addStatus(notFound("the site does not exist"));
    createAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    createAccount.setTestForm(new TestForm());
    createAccount.addRequiredParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    createAccount.addRequiredParameter(new Parameter("password", Parameter.Type.Password, "Password"));
    createAccount.addOptionalParameter(new Parameter("email", Parameter.Type.String, "E-mail address"));
    docs.addEndpoint(Endpoint.Type.WRITE, createAccount);

    // GET /account/{login}
    Endpoint getAccount = new Endpoint("/account/{login}", Method.GET, "getaccount");
    getAccount.setDescription("Returns the account");
    getAccount.addFormat(Format.xml());
    getAccount.addStatus(ok("the account information has been sent back to the client"));
    getAccount.addStatus(forbidden("insufficient rights to access the account"));
    getAccount.addStatus(notFound("the account does not exist"));
    getAccount.addStatus(notFound("the site does not exist"));
    getAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    getAccount.setTestForm(new TestForm());
    getAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
    docs.addEndpoint(Endpoint.Type.READ, getAccount);

    // PUT /account/{login}
    Endpoint updateAccount = new Endpoint("/account/{login}", Method.PUT, "updateaccount");
    updateAccount.setDescription("Updates the account");
    updateAccount.addFormat(Format.xml());
    updateAccount.addStatus(ok("the account has been updated"));
    updateAccount.addStatus(forbidden("insufficient rights to update the account"));
    updateAccount.addStatus(badRequest("if a non-existing language identifier is provided"));
    updateAccount.addStatus(notFound("the account does not exist"));
    updateAccount.addStatus(notFound("the site does not exist"));
    updateAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    updateAccount.setTestForm(new TestForm());
    updateAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    updateAccount.addOptionalParameter(new Parameter("email", Parameter.Type.String, "E-mail address"));
    updateAccount.addOptionalParameter(new Parameter("firstname", Parameter.Type.String, "First name"));
    updateAccount.addOptionalParameter(new Parameter("lastname", Parameter.Type.String, "Last name"));
    updateAccount.addOptionalParameter(new Parameter("initials", Parameter.Type.String, "Initials"));
    updateAccount.addOptionalParameter(new Parameter("language", Parameter.Type.String, "Two letter ISO code for the preferred language"));
    docs.addEndpoint(Endpoint.Type.WRITE, updateAccount);

    // PUT /account/{login}/password
    Endpoint updateAccountPassword = new Endpoint("/account/{login}/password", Method.PUT, "updateaccountpassword");
    updateAccountPassword.setDescription("Updates the account password");
    updateAccountPassword.addFormat(Format.xml());
    updateAccountPassword.addStatus(ok("the password has been updated"));
    updateAccountPassword.addStatus(forbidden("insufficient rights to update the account"));
    updateAccountPassword.addStatus(notFound("the account does not exist"));
    updateAccountPassword.addStatus(notFound("the site does not exist"));
    updateAccountPassword.addStatus(serviceUnavailable("the site is temporarily offline"));
    updateAccountPassword.setTestForm(new TestForm());
    updateAccountPassword.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    updateAccountPassword.addOptionalParameter(new Parameter("password", Parameter.Type.Password, "Password"));
    docs.addEndpoint(Endpoint.Type.WRITE, updateAccountPassword);

    // PUT /account/{login}/challenge
    Endpoint updateAccountChallenge = new Endpoint("/account/{login}/challenge", Method.PUT, "updateaccountchallenge");
    updateAccountChallenge.setDescription("Updates the account challenge");
    updateAccountChallenge.addFormat(Format.xml());
    updateAccountChallenge.addStatus(ok("the challenge has been updated"));
    updateAccountChallenge.addStatus(forbidden("insufficient rights to update the account"));
    updateAccountChallenge.addStatus(notFound("the account does not exist"));
    updateAccountChallenge.addStatus(notFound("the site does not exist"));
    updateAccountChallenge.addStatus(serviceUnavailable("the site is temporarily offline"));
    updateAccountChallenge.setTestForm(new TestForm());
    updateAccountChallenge.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    updateAccountChallenge.addOptionalParameter(new Parameter("challenge", Parameter.Type.String, "Password"));
    updateAccountChallenge.addOptionalParameter(new Parameter("response", Parameter.Type.Password, "Password"));
    docs.addEndpoint(Endpoint.Type.WRITE, updateAccountChallenge);

    // DELETE /account/{login}
    Endpoint deleteAccount = new Endpoint("/account/{login}", Method.DELETE, "removeaccount");
    deleteAccount.setDescription("Removes the account from the site");
    deleteAccount.addFormat(Format.xml());
    deleteAccount.addStatus(ok("the account has been removed"));
    deleteAccount.addStatus(notFound("the account does not exist"));
    deleteAccount.addStatus(notFound("the site does not exist"));
    deleteAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    deleteAccount.setTestForm(new TestForm());
    deleteAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
    docs.addEndpoint(Endpoint.Type.WRITE, deleteAccount);

    // PUT /account/{login}/status
    Endpoint enableAccount = new Endpoint("/account/{login}/status", Method.PUT, "enableaccount");
    enableAccount.setDescription("Enables the account");
    enableAccount.addFormat(Format.xml());
    enableAccount.addStatus(ok("the account has been enabled"));
    enableAccount.addStatus(notModified("the account was already enabled"));
    enableAccount.addStatus(forbidden("insufficient rights to enable the account"));
    enableAccount.addStatus(notFound("the account does not exist"));
    enableAccount.addStatus(notFound("the site does not exist"));
    enableAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    enableAccount.setTestForm(new TestForm());
    enableAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    docs.addEndpoint(Endpoint.Type.WRITE, enableAccount);

    // DELETE /account/{login}/status
    Endpoint disableAccount = new Endpoint("/account/{login}/status", Method.DELETE, "disableaccount");
    disableAccount.setDescription("Disables the account");
    disableAccount.addFormat(Format.xml());
    disableAccount.addStatus(ok("the account has been disabled"));
    disableAccount.addStatus(notModified("the account is already disabled"));
    disableAccount.addStatus(forbidden("insufficient rights to disable the account"));
    disableAccount.addStatus(notFound("the account does not exist"));
    disableAccount.addStatus(notFound("the site does not exist"));
    disableAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    disableAccount.setTestForm(new TestForm());
    disableAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
    docs.addEndpoint(Endpoint.Type.WRITE, disableAccount);

    // POST /account/{login}/roles/{context}
    Endpoint addRole = new Endpoint("/account/{login}/roles/{context}", Method.POST, "addrole");
    addRole.setDescription("Adds a role to the account");
    addRole.addFormat(Format.xml());
    addRole.addStatus(ok("the role has been added"));
    addRole.addStatus(notModified("the role is already owned by the account"));
    addRole.addStatus(badRequest("the role parameter is blank"));
    addRole.addStatus(forbidden("insufficient rights to add the role"));
    addRole.addStatus(notFound("the account does not exist"));
    addRole.addStatus(notFound("the site does not exist"));
    addRole.addStatus(serviceUnavailable("the site is temporarily offline"));
    addRole.setTestForm(new TestForm());
    addRole.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    addRole.addPathParameter(new Parameter("context", Parameter.Type.String, "Role context"));
    addRole.addRequiredParameter(new Parameter("role", Parameter.Type.String, "Role name"));
    docs.addEndpoint(Endpoint.Type.WRITE, addRole);

    // DELETE /account/{login}/roles/{context}
    Endpoint removeRole = new Endpoint("/account/{login}/roles/{context}", Method.DELETE, "removerole");
    removeRole.setDescription("Removes a role from the account");
    removeRole.addFormat(Format.xml());
    removeRole.addStatus(ok("the role has been removed"));
    removeRole.addStatus(notModified("the role had not been owned by the account"));
    removeRole.addStatus(badRequest("the role parameter is blank"));
    removeRole.addStatus(forbidden("insufficient rights to remove the role"));
    removeRole.addStatus(notFound("the account does not exist"));
    removeRole.addStatus(notFound("the site does not exist"));
    removeRole.addStatus(serviceUnavailable("the site is temporarily offline"));
    removeRole.setTestForm(new TestForm());
    removeRole.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    removeRole.addPathParameter(new Parameter("context", Parameter.Type.String, "Role context"));
    removeRole.addRequiredParameter(new Parameter("role", Parameter.Type.String, "Role name"));
    docs.addEndpoint(Endpoint.Type.WRITE, removeRole);

    return EndpointDocumentationGenerator.generate(docs);
  }
View Full Code Here

Examples of ch.ethz.inf.vs.californium.network.Endpoint

   * Binds the server to a ephemeral port on the specified address.
   *
   * @param address the address
   */
  private void bind(InetSocketAddress address) {
    Endpoint endpoint = new CoAPEndpoint(address, this.config);
    addEndpoint(endpoint);
  }
View Full Code Here

Examples of com.consol.citrus.endpoint.Endpoint

        FtpEndpointComponent component = new FtpEndpointComponent();

        reset(applicationContext);
        replay(applicationContext);

        Endpoint endpoint = component.createEndpoint("ftp:localhost:22220?user=admin&password=consol&timeout=10000", context);

        Assert.assertEquals(endpoint.getClass(), FtpClient.class);

        Assert.assertEquals(((FtpClient)endpoint).getEndpointConfiguration().getHost(), "localhost");
        Assert.assertEquals(((FtpClient)endpoint).getEndpointConfiguration().getPort(), new Integer(22220));
        Assert.assertEquals(((FtpClient) endpoint).getEndpointConfiguration().getUser(), "admin");
        Assert.assertEquals(((FtpClient) endpoint).getEndpointConfiguration().getPassword(), "consol");
View Full Code Here

Examples of com.consol.citrus.model.config.jms.Endpoint

    private JmsEndpointConverter endpointConverter = new JmsEndpointConverter();

    @Test
    public void testConvert() throws Exception {
        EndpointData endpointData = endpointConverter.convert(new Endpoint());
        Assert.assertEquals(endpointData.getType(), "jms");
    }
View Full Code Here

Examples of com.couchbase.client.core.endpoint.Endpoint

    }

    @Override
    public void send(final CouchbaseRequest request) {
        if (request instanceof BucketStreamingRequest) {
            final Endpoint endpoint = factory.create(hostname, bucket, password, port, env, responseBuffer);
            endpointStates.add(endpoint.states());
            endpoint
                .connect()
                .subscribe(new Subscriber<LifecycleState>() {
                    @Override
                    public void onCompleted() {
                        pinnedEndpoints.add(endpoint);
                        endpoint.send(request);
                        endpoint.send(SignalFlush.INSTANCE);
                    }

                    @Override
                    public void onError(Throwable e) {
                        request.observable().onError(e);
View Full Code Here

Examples of com.dbxml.labrador.Endpoint

         Key key = new Key(docName);

         // Let's see if we can interact with Labrador's HTTP Server for REST calls
         BrokerContext context = Broker.getInstance().getBrokerContext();
         Handler handler = context.getHandler();
         Endpoint endpoint = context.getRequestEndpoint();

         boolean restHandler = handler instanceof RESTHandler;
         boolean httpEndpoint = endpoint instanceof HTTPServerBase;

         if ( restHandler && httpEndpoint ) {
View Full Code Here

Examples of com.denimgroup.threadfix.data.interfaces.Endpoint

    EndpointQuery query = EndpointQueryBuilder.start()
        .setInformationSourceType(InformationSourceType.DYNAMIC)
        .setDynamicPath(dynamicPath)
        .generateQuery();
   
    Endpoint endpoint = db.findBestMatch(query);
   
    if (endpoint == null) {
      return "null result";
    } else {
      return endpoint.getFilePath();
    }
  }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jetty.io.EndPoint

                            toWrite[1] = chunk;
                            toRecycle[1] = chunk;
                        }
                        if (hasContent)
                            toWrite[toWrite.length - 1] = contentBuffer;
                        EndPoint endPoint = getHttpChannel().getHttpConnection().getEndPoint();
                        endPoint.write(new ByteBufferRecyclerCallback(callback, bufferPool, toRecycle), toWrite);
                        return;
                    }
                    default:
                    {
                        throw new IllegalStateException(result.toString());
View Full Code Here

Examples of com.ibm.sbt.jslibrary.SBTEnvironment.Endpoint

 
  /*
   * Create default endpoint
   */
  private Endpoint createDefaultEndpoint(RenderContext renderContext) {
    Endpoint endpoint = new Endpoint("connections", null);
    return endpoint;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.