Package org.glassfish.embeddable.web
Interface WebListener
-
- All Known Implementing Classes:
AjpListener,HttpListener,HttpsListener,WebListenerBase
public interface WebListenerRepresentation of a network listener for web requests. SeeWebContainerfor usage example.- Author:
- Rajiv Mordani, Amy Roh
-
-
Method Summary
All Methods Instance Methods Abstract 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 of 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 for this WebListener.voidsetWebContainer(WebContainer webContainer)Sets the WebContainer which will be used by this WebListener.
-
-
-
Method Detail
-
setId
void setId(String id)
Sets the id for this WebListener.- Parameters:
id- for this WebListener
-
getId
String getId()
Gets the id of this WebListener.- Returns:
- id of this WebListener
-
setPort
void setPort(int port)
Sets the port number for this WebListener.- Parameters:
port- the port number for this WebListener
-
getPort
int getPort()
Gets the port number of this WebListener.- Returns:
- the port number of this WebListener
-
setProtocol
void setProtocol(String protocol)
Sets the protocol for this WebListener.- Parameters:
protocol- the protocol for this WebListener
-
getProtocol
String getProtocol()
Gets the protocol of this WebListener.- Returns:
- the protocol of this WebListener
-
setConfig
void setConfig(WebListenerConfig config) throws ConfigException, GlassFishException
Reconfigures this WebListener with the given configuration.In order for the given configuration to take effect, this WebListener will be stopped and restarted.
- 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
WebListenerConfig getConfig()
Gets the current configuration of this WebListener.- Returns:
- the current configuration of this WebListener, or null if no special configuration was ever applied to this WebListener
-
setWebContainer
void setWebContainer(WebContainer webContainer)
Sets the WebContainer which will be used by this WebListener.
-
getWebContainer
WebContainer getWebContainer()
Gets the WebContainer used by this WebListener.
-
-