use of com.sun.enterprise.config.serverbeans.Config in project Payara by payara.
the class ListProtocolFilters method execute.
public void execute(AdminCommandContext context) {
Target targetUtil = services.getService(Target.class);
Config newConfig = targetUtil.getConfig(target);
if (newConfig != null) {
config = newConfig;
}
final ActionReport report = context.getActionReport();
Protocol protocol = config.getNetworkConfig().getProtocols().findProtocol(protocolName);
if (protocol != null) {
final ProtocolChain chain = protocol.getProtocolChainInstanceHandler().getProtocolChain();
if (chain != null) {
for (ProtocolFilter filter : chain.getProtocolFilter()) {
report.getTopMessagePart().addChild().setMessage(filter.getName());
}
}
}
report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
}
use of com.sun.enterprise.config.serverbeans.Config in project Payara by payara.
the class ListProtocolFinders method execute.
public void execute(AdminCommandContext context) {
Target targetUtil = services.getService(Target.class);
Config newConfig = targetUtil.getConfig(target);
if (newConfig != null) {
config = newConfig;
}
final ActionReport report = context.getActionReport();
Protocol protocol = config.getNetworkConfig().getProtocols().findProtocol(protocolName);
if (protocol != null) {
final PortUnification pu = protocol.getPortUnification();
if (pu != null) {
for (ProtocolFinder finder : pu.getProtocolFinder()) {
report.getTopMessagePart().addChild().setMessage(finder.getName());
}
}
}
report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
}
use of com.sun.enterprise.config.serverbeans.Config in project Payara by payara.
the class ListTransports method execute.
/**
* Executes the command with the command parameters passed as Properties where the keys are the paramter names and
* the values the parameter values
*
* @param context information
*/
public void execute(AdminCommandContext context) {
Target targetUtil = services.getService(Target.class);
Config newConfig = targetUtil.getConfig(target);
if (newConfig != null) {
config = newConfig;
}
final ActionReport report = context.getActionReport();
List<Transport> list = config.getNetworkConfig().getTransports().getTransport();
for (Transport transport : list) {
report.getTopMessagePart().addChild().setMessage(transport.getName());
}
report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
}
use of com.sun.enterprise.config.serverbeans.Config in project Payara by payara.
the class ListVirtualServers method execute.
/**
* Executes the command with the command parameters passed as Properties where the keys are the paramter names and
* the values the parameter values
*
* @param context information
*/
public void execute(AdminCommandContext context) {
Target targetUtil = services.getService(Target.class);
Config newConfig = targetUtil.getConfig(target);
if (newConfig != null) {
config = newConfig;
}
ActionReport report = context.getActionReport();
List<VirtualServer> list = config.getHttpService().getVirtualServer();
for (VirtualServer virtualServer : list) {
report.getTopMessagePart().addChild().setMessage(virtualServer.getId());
}
report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
}
use of com.sun.enterprise.config.serverbeans.Config in project Payara by payara.
the class WeldUtils method isImplicitBeanDiscoveryEnabled.
public static boolean isImplicitBeanDiscoveryEnabled() {
boolean result = false;
// Check the "global" configuration
ServiceLocator serviceLocator = Globals.getDefaultHabitat();
if (serviceLocator != null) {
Config config = serviceLocator.getService(Config.class, ServerEnvironment.DEFAULT_INSTANCE_NAME);
if (config != null) {
result = Boolean.valueOf(config.getExtensionByType(CDIService.class).getEnableImplicitCdi());
}
}
return result;
}
Aggregations