forked from grpc/grpc-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.grpc.internal; | ||
|
||
public class ManagedChannelImplBuilder extends AbstractManagedChannelImplBuilder<ManagedChannelImplBuilder> { | ||
private final TransportFactoryBuilder transportFactoryBuilder; | ||
|
||
public interface TransportFactoryBuilder { | ||
ClientTransportFactory buildTransportFactory(); | ||
} | ||
|
||
protected ManagedChannelImplBuilder(String target, | ||
TransportFactoryBuilder transportFactoryBuilder) { | ||
super(target); | ||
this.transportFactoryBuilder = transportFactoryBuilder; | ||
} | ||
|
||
public static ManagedChannelImplBuilder forTarget(String target, | ||
TransportFactoryBuilder transportFactoryBuilder) { | ||
return new ManagedChannelImplBuilder(target, transportFactoryBuilder); | ||
} | ||
|
||
@Override | ||
protected ClientTransportFactory buildTransportFactory() { | ||
return transportFactoryBuilder.buildTransportFactory(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters