Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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