Package org.glassfish.embeddable.web
Class WebListenerBase
- java.lang.Object
-
- org.glassfish.embeddable.web.WebListenerBase
-
- All Implemented Interfaces:
WebListener
- Direct Known Subclasses:
AjpListener,HttpListener,HttpsListener
public class WebListenerBase extends Object implements WebListener
Base implementation of the WebListener interface- Author:
- Amy Roh
-
-
Constructor Summary
Constructors Constructor Description WebListenerBase()WebListenerBase(String id, int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebListenerConfiggetConfig()Gets the current configuration of this WebListener.StringgetId()Gets the id of this WebListener.intgetPort()Gets the port number of this WebListener.StringgetProtocol()Gets the protocol used by this WebListener.WebContainergetWebContainer()Gets the WebContainer used by this WebListener.voidsetConfig(WebListenerConfig config)Reconfigures this WebListener with the given configuration.voidsetId(String id)Sets the id for this WebListener.voidsetPort(int port)Sets the port number for this WebListener.voidsetProtocol(String protocol)Sets the protocol which will be used by this WebListener.voidsetWebContainer(WebContainer webContainer)Sets the WebContainer which will be used by this WebListener.
-
-
-
Constructor Detail
-
WebListenerBase
public WebListenerBase()
-
WebListenerBase
public WebListenerBase(String id, int port)
-
-
Method Detail
-
setId
public void setId(String id)
Sets the id for this WebListener.- Specified by:
setIdin interfaceWebListener- Parameters:
id- for this WebListener
-
getId
public String getId()
Gets the id of this WebListener.- Specified by:
getIdin interfaceWebListener- Returns:
- id of this WebListener
-
setConfig
public void setConfig(WebListenerConfig config) throws ConfigException, GlassFishException
Reconfigures this WebListener with the given configuration.- Specified by:
setConfigin interfaceWebListener- Parameters:
config- the configuration to be applied- Throws:
ConfigException- if the configuration requires a restart, and this WebListener fails to be restartedGlassFishException- if an error occurs, and this WebListener fails to be restarted
-
getConfig
public WebListenerConfig getConfig()
Gets the current configuration of this WebListener.- Specified by:
getConfigin interfaceWebListener- Returns:
- the current configuration of this WebListener, or null if no special configuration was ever applied to this WebListener
-
setPort
public void setPort(int port)
Sets the port number for this WebListener.- Specified by:
setPortin interfaceWebListener- Parameters:
port- the port number for this WebListener
-
getPort
public int getPort()
Gets the port number of this WebListener.- Specified by:
getPortin interfaceWebListener- Returns:
- the port number of this WebListener
-
setProtocol
public void setProtocol(String protocol)
Sets the protocol which will be used by this WebListener.- Specified by:
setProtocolin interfaceWebListener- Parameters:
protocol- the protocol for this WebListener
-
getProtocol
public String getProtocol()
Gets the protocol used by this WebListener.- Specified by:
getProtocolin interfaceWebListener- Returns:
- the protocol of this WebListener
-
setWebContainer
public void setWebContainer(WebContainer webContainer)
Sets the WebContainer which will be used by this WebListener.- Specified by:
setWebContainerin interfaceWebListener
-
getWebContainer
public WebContainer getWebContainer()
Gets the WebContainer used by this WebListener.- Specified by:
getWebContainerin interfaceWebListener
-
-