Subversion Repositories SmartDukaan

Rev

Rev 2821 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2821 chandransh 1
package in.shop2020.thrift.clients;
2
 
3123 rajveer 3
import in.shop2020.warehouse.WarehouseService.Client;
2821 chandransh 4
import in.shop2020.utils.ConfigClientKeys;
5
 
6
import org.apache.thrift.transport.TTransportException;
7
 
3123 rajveer 8
public class WarehouseClient extends GenericClient{
2821 chandransh 9
 
3123 rajveer 10
	private Client client = null;
2821 chandransh 11
 
3123 rajveer 12
	/**
13
	 * 
14
	 * @throws TTransportException
15
	 */
16
	public WarehouseClient() throws TTransportException{
17
		this(ConfigClientKeys.warehouse_service_server_host.toString(), ConfigClientKeys.warehouse_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 WarehouseClient(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
 
2821 chandransh 45
}