Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4499 mandeep.dh 1
/**
2
 * 
3
 */
4
package in.shop2020.thrift.clients;
5
 
6
import in.shop2020.utils.ConfigClientKeys;
7
import in.shop2020.purchase.PurchaseService.Client;
8
 
9
import org.apache.thrift.transport.TTransportException;
10
 
11
/**
12
 * @author mandeep
13
 *
14
 */
15
public class PurchaseClient extends GenericClient {
16
 
17
    private Client client = null;
18
 
19
    /**
20
     * 
21
     * @throws TTransportException
22
     */
23
    public PurchaseClient() throws TTransportException{
24
        this(ConfigClientKeys.purchase_service_server_host.toString(), ConfigClientKeys.purchase_service_server_port.toString());
25
    }
26
 
27
    /**
28
     * get the client for given hostkey and portkey
29
     * @param hostConfigKey
30
     * @param portConfigKey
31
     * @throws TTransportException
32
     */
33
    public PurchaseClient(String hostConfigKey, String portConfigKey) throws TTransportException{
34
        super(hostConfigKey, portConfigKey);
35
        client = new Client(protocol);
36
    }
37
 
38
 
39
    /**
40
     * Get the client
41
     * @return
42
     */
43
    public Client getClient(){
44
        return client;
45
    }
46
 
47
    @Override
48
    public void closeSession() {
49
        return;
50
    }
51
 
52
}