Package org.glassfish.kernel.embedded
Class EmbeddedAdminCtrImpl
- java.lang.Object
-
- org.glassfish.kernel.embedded.EmbeddedAdminCtrImpl
-
- All Implemented Interfaces:
EmbeddedAdminContainer,EmbeddedContainer
@Service public class EmbeddedAdminCtrImpl extends Object implements EmbeddedAdminContainer
Implementation of the embedded command execution- Author:
- Jerome Dochez
-
-
Constructor Summary
Constructors Constructor Description EmbeddedAdminCtrImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(Port port)Make the server listen to administrative requests (CLI, REST) on the passed port.voidbind(Port port, String protocol)Binds a port using a specific protocol to this container.CommandExecutionexecute(String commandName, CommandParameters params)Executes synchronously a commandList<Sniffer>getSniffers()Returns the list of sniffers associated with this container.voidstart()Starts the embedded container instancevoidstop()Stops the embedded container instance
-
-
-
Method Detail
-
getSniffers
public List<Sniffer> getSniffers()
Description copied from interface:EmbeddedContainerReturns the list of sniffers associated with this container.- Specified by:
getSniffersin interfaceEmbeddedContainer- Returns:
- a list of sniffers that will be used when application are deployed to the embedded server.
-
bind
public void bind(Port port, String protocol)
Description copied from interface:EmbeddedContainerBinds a port using a specific protocol to this container.- Specified by:
bindin interfaceEmbeddedContainer- Parameters:
port- the port instance to bindprotocol- the protocol the port should be used for, can be null and the container can use the port for any protocol(s) it needs to.
-
start
public void start() throws LifecycleExceptionDescription copied from interface:EmbeddedContainerStarts the embedded container instance- Specified by:
startin interfaceEmbeddedContainer- Throws:
LifecycleException- if the container cannot started
-
stop
public void stop() throws LifecycleExceptionDescription copied from interface:EmbeddedContainerStops the embedded container instance- Specified by:
stopin interfaceEmbeddedContainer- Throws:
LifecycleException- if the container cannot be stopped
-
execute
public CommandExecution execute(String commandName, CommandParameters params)
Description copied from interface:EmbeddedAdminContainerExecutes synchronously a command- Specified by:
executein interfaceEmbeddedAdminContainer- Parameters:
commandName- command name as typed by asadmin usersparams- command parameters- Returns:
- an command excecution to follow command's execution
-
bind
public void bind(Port port)
Description copied from interface:EmbeddedAdminContainerMake the server listen to administrative requests (CLI, REST) on the passed port.- Specified by:
bindin interfaceEmbeddedAdminContainer- Parameters:
port- an initialized port
-
-