Add server side credentials support.
Make interop test use ssl by default.
Change on 2014/12/08 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81619141
diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h
index 89e9a25..cf27452 100644
--- a/include/grpc++/server_builder.h
+++ b/include/grpc++/server_builder.h
@@ -43,6 +43,7 @@
class RpcService;
class Server;
+class ServerCredentials;
class ThreadPoolInterface;
class ServerBuilder {
@@ -57,6 +58,10 @@
// Add a listening port. Can be called multiple times.
void AddPort(const grpc::string& addr);
+ // Set a ServerCredentials. Can only be called once.
+ // TODO(yangg) move this to be part of AddPort
+ void SetCredentials(const std::shared_ptr<ServerCredentials>& creds);
+
// Set the thread pool used for running appliation rpc handlers.
// Does not take ownership.
void SetThreadPool(ThreadPoolInterface* thread_pool);
@@ -67,6 +72,7 @@
private:
std::vector<RpcService*> services_;
std::vector<grpc::string> ports_;
+ std::shared_ptr<ServerCredentials> creds_;
ThreadPoolInterface* thread_pool_;
};