Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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