本文整理了Java中com.sun.enterprise.config.serverbeans.Server.getName()
方法的一些代码示例,展示了Server.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.getName()
方法的具体详情如下:
包路径:com.sun.enterprise.config.serverbeans.Server
类名称:Server
方法名:getName
暂无
代码示例来源:origin: org.glassfish.main.admin/config-api
public static boolean isDas(Server server) {
String name = (server == null) ? null : server.getName();
return "server".equals(name);
}
代码示例来源:origin: org.glassfish.admin/config-api
public static boolean isDas(Server server) {
String name = (server == null) ? null : server.getName();
return "server".equals(name);
}
代码示例来源:origin: org.glassfish.main.core/kernel
private String getNames(List<Server> list) {
boolean first = true;
StringBuilder sb = new StringBuilder();
for (Server server : list) {
if (first)
first = false;
else
sb.append(", ");
sb.append(server.getName());
}
return sb.toString();
}
代码示例来源:origin: org.glassfish.admin/config-api
@Override
public String toString() {
StringBuilder sb = new StringBuilder("ServerPorts Dump:").append('\n');
sb.append("server: ").append(server.getName()).append(", ");
sb.append("Properties: ").append(props).append('\n');
return sb.toString();
}
private Server server;
代码示例来源:origin: org.glassfish.main.admin/config-api
@Override
public String toString() {
StringBuilder sb = new StringBuilder("ServerPorts Dump:").append('\n');
sb.append("server: ").append(server.getName()).append(", ");
sb.append("Properties: ").append(props).append('\n');
return sb.toString();
}
private Server server;
代码示例来源:origin: org.glassfish.main.admin/config-api
public static Server getServer(Servers instance, String name) {
for (Server server : instance.getServer()) {
if (server.getName().equals(name)) {
return server;
}
}
return null;
}
代码示例来源:origin: org.glassfish.main.core/kernel
/**
* Returns true if life cycle module is enabled in the application
* level and in the application ref level.
*
* @return true if life cycle module is enabled
*/
private boolean isEnabled(String name, String enabled) {
// true if enabled in both lifecyle module and in the ref
return (Boolean.valueOf(enabled) &&
Boolean.valueOf(configBeansUtilities.getEnabled(
server.getName(), name)));
}
代码示例来源:origin: org.glassfish.cluster/cluster-admin
private static String serverListToString(List<Server> servers) {
StringBuilder sb = new StringBuilder();
for (Server s : servers) {
sb.append(s.getNodeRef() + ":" + s.getName() + " ");
}
return sb.toString().trim();
}
代码示例来源:origin: org.glassfish.main.cluster/cluster-admin
private static String serverListToString(List<Server> servers) {
StringBuilder sb = new StringBuilder();
for (Server s : servers) {
sb.append(s.getNodeRef() + ":" + s.getName() + " ");
}
return sb.toString().trim();
}
代码示例来源:origin: org.glassfish.admin/config-api
public static Server getServer(Servers instance, String name) {
for (Server server : instance.getServer()) {
if (server.getName().equals(name)) {
return server;
}
}
return null;
}
代码示例来源:origin: org.glassfish.main.core/kernel
private List<Server> getRemoteServers() {
// only call on DAS !!!
if (!isDas())
throw new RuntimeException("Internal Error"); // todo?
List<Server> notdas = new ArrayList<Server>(targets.size());
String dasName = serverEnv.getInstanceName();
for (Server server : targets) {
if (!dasName.equals(server.getName()))
notdas.add(server);
}
return notdas;
}
代码示例来源:origin: org.glassfish.main.admin/config-api
public String resolveExpression(String expression) {
if (expression.startsWith("$")) {
String name = expression.substring(1, expression.length());
if (name.equalsIgnoreCase("CURRENT_INSTANCE_CONFIG_NAME")) {
expression = serviceLocator.<Config>getService(Config.class, ServerEnvironment.DEFAULT_INSTANCE_NAME).getName();
}
if (name.equalsIgnoreCase("CURRENT_INSTANCE_SERVER_NAME")) {
expression = serviceLocator.<Server>getService(Server.class, ServerEnvironment.DEFAULT_INSTANCE_NAME).getName();
}
}
return expression;
}
代码示例来源:origin: org.glassfish.main.transaction/jts
private boolean isServerRunning(String serverName) {
boolean rs = false;
for(Server server : servers.getServer()) {
if(serverName.equals(server.getName())) {
rs = server.isRunning();
break;
}
}
return rs;
}
代码示例来源:origin: org.glassfish.main.admin/config-api
public static Server getServerNamed(Domain d, String name) {
if (d.getServers() == null || name == null)
throw new IllegalArgumentException ("no <servers> element");
List<Server> servers = d.getServers().getServer();
for (Server s : servers) {
if (name.equals(s.getName().trim())) {
return s;
}
}
return null;
}
代码示例来源:origin: org.glassfish.main.admin/config-api
public Server getServerNamed(String name) {
if (domain == null || domain.getServers() == null || name == null)
throw new IllegalArgumentException ("Either domain is null or no <servers> element");
List<Server> servers = domain.getServers().getServer();
for (Server s : servers) {
if (name.equals(s.getName().trim())) {
return s;
}
}
return null;
}
代码示例来源:origin: org.glassfish.admin/config-api
public static Server getServerNamed(String name) {
if (domain == null || domain.getServers() == null || name == null)
throw new IllegalArgumentException ("Either domain is null or no <servers> element");
List<Server> servers = domain.getServers().getServer();
for (Server s : servers) {
if (name.equals(s.getName().trim())) {
return s;
}
}
return null;
}
代码示例来源:origin: org.glassfish.main.core/kernel
@Override
public void postConstruct() {
setVersion();
setSystemPropertiesFromEnv();
setSystemPropertiesFromDomainXml();
resolveJavaConfig();
_logger.fine("SystemTasks: loaded server named: " + server.getName());
}
代码示例来源:origin: org.glassfish.main.core/kernel
private boolean clusterHas(SystemProperty sp) {
Cluster c = domain.getClusterForInstance(server.getName());
return c != null ? hasSystemProperty(c.getSystemProperty(), sp) : false;
}
代码示例来源:origin: org.glassfish.admin/config-api
ServerPorts(Domain domain, Server theServer) {
Cluster cluster = null;
Config config = null;
if (theServer.isInstance())
cluster = domain.getClusterForInstance(theServer.getName());
String configName = theServer.getConfigRef();
if (StringUtils.ok(configName))
config = domain.getConfigNamed(configName);
initialize(cluster, config, domain, theServer);
}
代码示例来源:origin: org.glassfish.main.admin/config-api
ServerPorts(Domain domain, Server theServer) {
Cluster cluster = null;
Config config = null;
if (theServer.isInstance())
cluster = domain.getClusterForInstance(theServer.getName());
String configName = theServer.getConfigRef();
if (StringUtils.ok(configName))
config = domain.getConfigNamed(configName);
initialize(cluster, config, domain, theServer);
}
内容来源于网络,如有侵权,请联系作者删除!