本文整理汇总了Java中org.cloudfoundry.receptor.commands.ActualLRPResponse.getAddress方法的典型用法代码示例。如果您正苦于以下问题:Java ActualLRPResponse.getAddress方法的具体用法?Java ActualLRPResponse.getAddress怎么用?Java ActualLRPResponse.getAddress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cloudfoundry.receptor.commands.ActualLRPResponse
的用法示例。
在下文中一共展示了ActualLRPResponse.getAddress方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createServiceInfo
import org.cloudfoundry.receptor.commands.ActualLRPResponse; //导入方法依赖的package包/类
@Override
public RedisServiceInfo createServiceInfo(Process process) {
ActualLRPResponse actual = process.getFirstActual();
String address = actual.getAddress();
int port = actual.getPorts()[0].getHostPort();
String password = null;
return new RedisServiceInfo(actual.getInstanceGuid(), address, port, password);
}
示例2: createServiceInfo
import org.cloudfoundry.receptor.commands.ActualLRPResponse; //导入方法依赖的package包/类
@Override
public AmqpServiceInfo createServiceInfo(Process process) {
ActualLRPResponse actual = process.getFirstActual();
String address = actual.getAddress();
int port = actual.getPorts()[0].getHostPort();
String username = "guest";
String password = "guest";
String virtualHost = null;
return new LatticeAmqpServiceInfo(actual.getInstanceGuid(), address, port, username, password, virtualHost);
}
示例3: createServiceInfo
import org.cloudfoundry.receptor.commands.ActualLRPResponse; //导入方法依赖的package包/类
@Override
public MysqlServiceInfo createServiceInfo(Process process) {
ActualLRPResponse actual = process.getFirstActual();
String scheme = "jdbc:"+ MysqlServiceInfo.MYSQL_SCHEME;
String address = actual.getAddress();
int port = actual.getPorts()[0].getHostPort();
String username = "root";
String password = findRequiredEnvVar(process, "MYSQL_ROOT_PASSWORD");
String path = findEnvVar(process, "MYSQL_DATABASE_NAME", "test");
return new MysqlServiceInfo(actual.getInstanceGuid(), constructJdbcUrl(scheme, address, port, username, password, path));
}