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 WebListenerConfig
getConfig()
Gets the current configuration of this WebListener.String
getId()
Gets the id of this WebListener.int
getPort()
Gets the port number of this WebListener.String
getProtocol()
Gets the protocol used by this WebListener.WebContainer
getWebContainer()
Gets the WebContainer used by this WebListener.void
setConfig(WebListenerConfig config)
Reconfigures this WebListener with the given configuration.void
setId(String id)
Sets the id for this WebListener.void
setPort(int port)
Sets the port number for this WebListener.void
setProtocol(String protocol)
Sets the protocol which will be used by this WebListener.void
setWebContainer(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:
setId
in interfaceWebListener
- Parameters:
id
- for this WebListener
-
getId
public String getId()
Gets the id of this WebListener.- Specified by:
getId
in interfaceWebListener
- Returns:
- id of this WebListener
-
setConfig
public void setConfig(WebListenerConfig config) throws ConfigException, GlassFishException
Reconfigures this WebListener with the given configuration.- Specified by:
setConfig
in 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:
getConfig
in 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:
setPort
in interfaceWebListener
- Parameters:
port
- the port number for this WebListener
-
getPort
public int getPort()
Gets the port number of this WebListener.- Specified by:
getPort
in 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:
setProtocol
in interfaceWebListener
- Parameters:
protocol
- the protocol for this WebListener
-
getProtocol
public String getProtocol()
Gets the protocol used by this WebListener.- Specified by:
getProtocol
in 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:
setWebContainer
in interfaceWebListener
-
getWebContainer
public WebContainer getWebContainer()
Gets the WebContainer used by this WebListener.- Specified by:
getWebContainer
in interfaceWebListener
-
-