Native5 APIs Native5 APIs
  • Namespace
  • Class
  • Tree

Namespaces

  • Native5
    • Services
      • Identity
      • Job
      • Messaging
      • Users
    • Users
  • PHP

Classes

  • Job
  • JobManager
 1 <?php
 2 /**
 3  *  Copyright 2012 Native5. All Rights Reserved
 4  *
 5  *  Licensed under the Apache License, Version 2.0 (the "License");
 6  *  You may not use this file except in compliance with the License.
 7  *
 8  *  Unless required by applicable law or agreed to in writing, software
 9  *  distributed under the License is distributed on an "AS IS" BASIS,
10  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11  *  See the License for the specific language governing permissions and
12  *  limitations under the License.
13  *  PHP version 5.3+
14  *
15  * @category  Jobs
16  * @package   Native5\Services\Jobs
17  * @author    Barada Sahu <barry@native5.com>
18  * @copyright 2012 Native5. All Rights Reserved 
19  * @license   See attached LICENSE for details
20  * @version   GIT: $gitid$ 
21  * @link      http://www.docs.native5.com 
22  */
23 
24 namespace Native5\Services\Job;
25 
26 /**
27  * JobStatus 
28  * 
29  * @category  Jobs 
30  * @package   Native5\Services\Jobs
31  * @author    Shamik Datta <shamik@native5.com>
32  * @copyright 2012 Native5. All Rights Reserved 
33  * @license   See attached NOTICE.md for details
34  * @version   Release: 1.0 
35  * @link      http://www.docs.native5.com 
36  */
37 
38 class Job {
39     const STATUS_CREATED = 0;
40     const STATUS_RUNNING = 1;
41     const STATUS_COMPLETED_SUCCESS = 2;
42     const STATUS_COMPLETED_ERROR = 3;
43 
44     private $_serviceName;
45     private $_status;
46     private $_state;
47     private $_result;
48 
49     public function setServiceName($name) {
50         $this->_serviceName = $name;
51     }
52 
53     public function getServiceName(){
54         return $this->_serviceName;
55     }
56 
57     public function setStatus($status) {
58         $this->_status = $status;
59     }
60 
61     public function getStatus(){
62         return $this->_status;
63     }
64 
65     public function setState($state) {
66         $this->_state = $state;
67     }
68 
69     public function getState() {
70         return $this->_state;
71     }
72 
73     public function setResult($result) {
74         $this->_result = $result;
75     }
76 
77     public function getResult() {
78         return $this->_result;
79     }
80 }
81 
82