Exemple #1
0
    public RabbitmqWebRequest Hosts()
    {
        // GET
        string path = url + "/api/vhosts";

        requestHosts = new RabbitmqWebRequest(path, UnityWebRequest.kHttpVerbGET);
        requestHosts.Start();
        return(requestHosts);
    }
Exemple #2
0
    public RabbitmqWebRequest IsAlive(string vhost)
    {
        // GET
        string path = url + "/api/aliveness-test/" + vhost;

        requestIsAlive = new RabbitmqWebRequest(path, UnityWebRequest.kHttpVerbGET);
        requestIsAlive.Start();
        return(requestIsAlive);
    }
Exemple #3
0
    public RabbitmqWebRequest Queues()
    {
        // GET
        string path = url + "/api/queues";

        requestQueues = new RabbitmqWebRequest(path, UnityWebRequest.kHttpVerbGET);
        requestQueues.Start();
        return(requestQueues);
    }
Exemple #4
0
    public RabbitmqWebRequest ConsumersInHost(string vhost)
    {
        // GET
        string path = url + "/api/consumers/" + vhost;

        RequestConsumersInHost = new RabbitmqWebRequest(path, UnityWebRequest.kHttpVerbGET);
        RequestConsumersInHost.Start();
        return(RequestConsumersInHost);
    }
Exemple #5
0
    public RabbitmqWebRequest Consumers()
    {
        // GET
        string path = url + "/api/consumers";

        requestConsumers = new RabbitmqWebRequest(path, UnityWebRequest.kHttpVerbGET);
        requestConsumers.Start();
        return(requestConsumers);
    }
Exemple #6
0
    public RabbitmqWebRequest Node(string node)
    {
        // GET
        string path = url + "/api/nodes/" + node;

        requestNode = new RabbitmqWebRequest(path, UnityWebRequest.kHttpVerbGET);
        requestNode.Start();
        return(requestNode);
    }
Exemple #7
0
    public RabbitmqWebRequest ClusterName()
    {
        // GET
        string path = url + "/api/cluster-name";

        requestClusterName = new RabbitmqWebRequest(path, UnityWebRequest.kHttpVerbGET);
        requestClusterName.Start();
        return(requestClusterName);
    }
Exemple #8
0
    public RabbitmqWebRequest Purge(string queue)
    {
        string vhost = this.connection.Host;
        // Delete
        string path = url + "/api/queues/" + vhost + "/" + queue + "/contents";

        requestPurge = new RabbitmqWebRequest(path, UnityWebRequest.kHttpVerbDELETE);
        requestPurge.Start();
        return(requestPurge);
    }
Exemple #9
0
    public RabbitmqWebRequest Overview()
    {
        if (this.connection == null)
        {
            Init();
        }
        // GET
        string path = url + "/api/overview";

        if (requestOverview == null)
        {
            requestOverview = new RabbitmqWebRequest(path, UnityWebRequest.kHttpVerbGET);
        }
        else
        {
            switch (requestOverview.ResponseCode)
            {
            case UnityWebRequestResponseCode.NOT_FINISHED:
                break;

            case UnityWebRequestResponseCode.FINISHED_SUCCESSFULLY:
                StartCoroutine(requestOverview.GetRequest());
                break;

            case UnityWebRequestResponseCode.UNAUTHORIZED:
                StartCoroutine(requestOverview.GetRequest());
                break;

            case UnityWebRequestResponseCode.SOMETHING_ELSE:
                StartCoroutine(requestOverview.GetRequest());
                break;

            default:
                break;
            }

            //if (requestOverview.ResponseCode == UnityWebRequestResponseCode. requestOverview.RequestFinished && requestOverview.continuous)
            //{
            //    StartCoroutine(requestOverview.GetRequest());
            //}
        }

        //StartCoroutine(requestOverview.GetRequest());
        return(requestOverview);
    }