pull up Redis URI scheme

This commit is contained in:
Christopher Smith
2014-07-09 19:38:52 -05:00
parent eb732d792e
commit 0fcfa7c653
3 changed files with 10 additions and 6 deletions

View File

@@ -12,7 +12,8 @@ import org.springframework.cloud.service.common.RedisServiceInfo;
public class RedisServiceInfoCreator extends CloudFoundryServiceInfoCreator<RedisServiceInfo> {
public RedisServiceInfoCreator() {
super(new Tags("redis"), "redis");
// the literal in the tag is CloudFoundry-specific
super(new Tags("redis"), RedisServiceInfo.URI_SCHEME);
}
public RedisServiceInfo createServiceInfo(Map<String,Object> serviceData) {

View File

@@ -4,16 +4,19 @@ import org.springframework.cloud.service.UriBasedServiceInfo;
import org.springframework.cloud.service.ServiceInfo.ServiceLabel;
/**
*
*
* @author Ramnivas Laddad
*
*/
@ServiceLabel("redis")
public class RedisServiceInfo extends UriBasedServiceInfo {
public static final String URI_SCHEME = "redis";
public RedisServiceInfo(String id, String host, int port, String password) {
super(id, "redis", host, port, null, password, null);
super(id, URI_SCHEME, host, port, null, password, null);
}
public RedisServiceInfo(String id, String uri) {
super(id, uri);
}

View File

@@ -3,14 +3,14 @@ package org.springframework.cloud.heroku;
import org.springframework.cloud.service.common.RedisServiceInfo;
/**
*
*
* @author Ramnivas Laddad
*
*/
public class RedisServiceInfoCreator extends HerokuServiceInfoCreator<RedisServiceInfo> {
public RedisServiceInfoCreator() {
super("redis");
super(RedisServiceInfo.URI_SCHEME);
}
@Override