本文整理了Java中com.sun.enterprise.config.serverbeans.Application.getEngine()
方法的一些代码示例,展示了Application.getEngine()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getEngine()
方法的具体详情如下:
包路径:com.sun.enterprise.config.serverbeans.Application
类名称:Application
方法名:getEngine
[英]Gets the value of the engine property.
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set
method for the engine property.
For example, to add a new item, do as follows:
getEngine().add(newItem);
Objects of the following type(s) are allowed in the list Engine
[中]获取引擎属性的值。
此访问器方法返回对活动列表的引用,而不是快照。因此,对返回列表所做的任何修改都将出现在JAXB对象中。这就是引擎属性没有set
方法的原因。
例如,要添加新项目,请执行以下操作:
getEngine().add(newItem);
列表引擎中允许以下类型的对象
代码示例来源:origin: org.glassfish.deployment/deployment-admin
private List<Engine> getAppEngines(final Application app) {
final List<Engine> engineList = new ArrayList<Engine>();
// first add application level engines
engineList.addAll(app.getEngine());
// now add module level engines
for (Module module: app.getModule()) {
engineList.addAll(module.getEngines());
}
return engineList;
}
代码示例来源:origin: org.glassfish.admin/config-api
public Object run(Application application) throws PropertyVetoException, TransactionFailure {
Module module = application.createChild(Module.class);
module.setName(application.getName());
for (Engine engine : application.getEngine()) {
module.getEngines().add(engine);
}
application.getModule().add(module);
application.getEngine().clear();
return null;
}
}, app);
代码示例来源:origin: org.glassfish.main.admin/admin-core
public Object run(Application application) throws PropertyVetoException, TransactionFailure {
Module module = application.createChild(Module.class);
module.setName(application.getName());
for (Engine engine : application.getEngine()) {
module.getEngines().add(engine);
}
application.getModule().add(module);
application.getEngine().clear();
return null;
}
}, app);
代码示例来源:origin: org.glassfish.admin/config-api
public static boolean containsSnifferType(Application app,
String snifferType) {
List<Engine> engineList = new ArrayList<Engine>();
// first add application level engines
engineList.addAll(app.getEngine());
// now add module level engines
for (Module module: app.getModule()) {
engineList.addAll(module.getEngines());
}
for (Engine engine : engineList) {
if (engine.getSniffer().equals(snifferType)) {
return true;
}
}
return false;
}
代码示例来源:origin: org.glassfish.main.admin/config-api
public static boolean containsSnifferType(Application app,
String snifferType) {
List<Engine> engineList = new ArrayList<Engine>();
// first add application level engines
engineList.addAll(app.getEngine());
// now add module level engines
for (Module module : app.getModule()) {
engineList.addAll(module.getEngines());
}
for (Engine engine : engineList) {
if (engine.getSniffer().equals(snifferType)) {
return true;
}
}
return false;
}
代码示例来源:origin: org.glassfish.admin/config-api
allApps.addAll(domain.getSystemApplications().getApplications());
for (Application app : allApps) {
if (app.getEngine()!=null && app.getEngine().size()>0 &&
(app.getModule()==null || app.getModule().size()==0)) {
代码示例来源:origin: org.glassfish.main.admin/admin-core
allApps.addAll(domain.getSystemApplications().getApplications());
for (Application app : allApps) {
if (app.getEngine()!=null && app.getEngine().size()>0 &&
(app.getModule()==null || app.getModule().size()==0)) {
代码示例来源:origin: eclipse-ee4j/glassfish
/**
* Saves its state to the configuration. this method must be called within a transaction
* to the configured Application instance.
*
* @param app the application being persisted
*/
public void save(Application app) throws TransactionFailure, PropertyVetoException {
for (EngineRef ref : engines) {
Engine engine = app.createChild(Engine.class);
app.getEngine().add(engine);
ref.save(engine);
}
for (ModuleInfo module : modules) {
Module modConfig = app.getModule(module.getName());
if (modConfig == null) {
// not a JavaEE module, create it here
modConfig = app.createChild(Module.class);
modConfig.setName(module.getName());
app.getModule().add(modConfig);
}
module.save(modConfig);
}
}
代码示例来源:origin: org.glassfish.common/internal-api
/**
* Saves its state to the configuration. this method must be called within a transaction
* to the configured Application instance.
*
* @param app the application being persisted
*/
public void save(Application app) throws TransactionFailure, PropertyVetoException {
for (EngineRef ref : engines) {
Engine engine = app.createChild(Engine.class);
app.getEngine().add(engine);
ref.save(engine);
}
for (ModuleInfo module : modules) {
Module modConfig = app.getModule(module.getName());
if (modConfig == null) {
// not a JavaEE module, create it here
modConfig = app.createChild(Module.class);
modConfig.setName(module.getName());
app.getModule().add(modConfig);
}
module.save(modConfig);
}
}
内容来源于网络,如有侵权,请联系作者删除!