Skip to content

Commit 63e33b4

Browse files
committed
---
yaml --- r: 2843 b: refs/heads/dns-alpha c: bf1361c h: refs/heads/master i: 2841: 1b2f229 2839: 18467a0
1 parent 070a348 commit 63e33b4

5 files changed

Lines changed: 138 additions & 1 deletion

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd
1111
refs/tags/v0.0.11: ffbfba48a6426ff63c08ff2117e58681f251fbf2
1212
refs/tags/v0.0.12: 2fd8066e891fb3dfea69b65f6bf6461db79342b9
1313
refs/heads/compute-alpha: b1274b5bdf4eea955f3588b56378a5ae4ba59cef
14-
refs/heads/dns-alpha: 81cedc4edf78e745817c831c1d7cde7653dfc4f8
14+
refs/heads/dns-alpha: bf1361c034633137ba395f6e565a1579fb4797fb

branches/dns-alpha/gcloud-java-dns/src/main/java/com/google/gcloud/dns/DnsService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import com.google.common.base.Joiner;
2020
import com.google.common.collect.Sets;
21+
import com.google.gcloud.Service;
2122
import com.google.gcloud.spi.DnsServiceRpc;
2223

2324
import java.io.Serializable;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright 2016 Google Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.gcloud.dns;
18+
19+
import com.google.gcloud.ServiceFactory;
20+
21+
/**
22+
* An interface for DnsService factories.
23+
*/
24+
public interface DnsServiceFactory extends ServiceFactory<DnsService, DnsServiceOptions> {
25+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* Copyright 2015 Google Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.gcloud.dns;
18+
19+
import com.google.gcloud.ServiceOptions;
20+
import com.google.gcloud.spi.DnsServiceRpc;
21+
import com.google.gcloud.spi.DnsServiceRpcFactory;
22+
23+
import java.util.Set;
24+
25+
public class DnsServiceOptions
26+
extends ServiceOptions<DnsService, DnsServiceRpc, DnsServiceOptions> {
27+
28+
private static final long serialVersionUID = -5311219368450107146L;
29+
30+
// TODO(mderka) Finish implementation. Created issue #595.
31+
32+
public static class DefaultDnsServiceFactory implements DnsServiceFactory {
33+
private static final DnsServiceFactory INSTANCE = new DefaultDnsServiceFactory();
34+
35+
@Override
36+
public DnsService create(DnsServiceOptions options) {
37+
// TODO(mderka) Implement. Created issue #595.
38+
return null;
39+
}
40+
}
41+
42+
public static class Builder extends ServiceOptions.Builder<DnsService, DnsServiceRpc,
43+
DnsServiceOptions, Builder> {
44+
45+
private Builder() {
46+
}
47+
48+
private Builder(DnsServiceOptions options) {
49+
super(options);
50+
}
51+
52+
@Override
53+
public DnsServiceOptions build() {
54+
return new DnsServiceOptions(this);
55+
}
56+
}
57+
58+
private DnsServiceOptions(Builder builder) {
59+
super(DnsServiceFactory.class, DnsServiceRpcFactory.class, builder);
60+
}
61+
62+
@Override
63+
protected DnsServiceFactory defaultServiceFactory() {
64+
return DefaultDnsServiceFactory.INSTANCE;
65+
}
66+
67+
@Override
68+
protected DnsServiceRpcFactory defaultRpcFactory() {
69+
return null;
70+
}
71+
72+
@Override
73+
protected Set<String> scopes() {
74+
return null;
75+
}
76+
77+
@Override
78+
public Builder toBuilder() {
79+
return new Builder(this);
80+
}
81+
82+
public static Builder builder() {
83+
return new Builder();
84+
}
85+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2016 Google Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.gcloud.spi;
18+
19+
import com.google.gcloud.dns.DnsServiceOptions;
20+
21+
/**
22+
* An interface for DnsServiceRpc factory. Implementation will be loaded via {@link
23+
* java.util.ServiceLoader}.
24+
*/
25+
public interface DnsServiceRpcFactory extends ServiceRpcFactory<DnsServiceRpc, DnsServiceOptions> {
26+
}

0 commit comments

Comments
 (0)