Package org.glassfish.embeddable.web
Interface WebListener
-
- All Known Implementing Classes:
AjpListener
,HttpListener
,HttpsListener
,WebListenerBase
public interface WebListener
Representation of a network listener for web requests. SeeWebContainer
for usage example.- Author:
- Rajiv Mordani, Amy Roh
-
-
Method Summary
All Methods Instance Methods Abstract 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 of 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 for this WebListener.void
setWebContainer(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.
-
-