QueueConnectionFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 23
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A createQueueConnection() 0 4 1
1
<?php
2
3
/**
4
 * AppserverIo\Messaging\QueueConnectionFactory
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 5
13
 *
14
 * @author    Tim Wagner <[email protected]>
15
 * @copyright 2015 TechDivision GmbH <[email protected]>
16
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link      https://github.com/appserver-io/messaging
18
 * @link      http://www.appserver.io
19
 */
20
21
namespace AppserverIo\Messaging;
22
23
use AppserverIo\Properties\PropertiesInterface;
24
25
/**
26
 * A factory implementation for creating queue connections.
27
 *
28
 * @author    Tim Wagner <[email protected]>
29
 * @copyright 2015 TechDivision GmbH <[email protected]>
30
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
31
 * @link      https://github.com/appserver-io/messaging
32
 * @link      http://www.appserver.io
33
 */
34
class QueueConnectionFactory
35
{
36
37
    /**
38
     * Protected constructor to use class only in static context.
39
     */
40
    protected function __construct()
41
    {
42
    }
43
44
    /**
45
     * Returns the queue connection instance as singleton.
46
     *
47
     * @param string                                      $appName    Name of the webapp using this client connection
48
     * @param \AppserverIo\Properties\PropertiesInterface $properties The properties containing the connection parameters
49
     *
50
     * @return \AppserverIo\Messaging\QueueConnection The singleton instance
51
     */
52
    public static function createQueueConnection($appName = '', PropertiesInterface $properties = null)
53
    {
54
        return new QueueConnection($appName, $properties);
55
    }
56
}
57