Top Description Fields Constructors Methods
org.eclipse.jgit.junit.http

public Class MockServletConfig

extends Object
implements ServletConfig
Class Inheritance
All Implemented Interfaces
jakarta.servlet.ServletConfig
Imports
java.util.Enumeration, .HashMap, .Iterator, .Map, jakarta.servlet.ServletConfig, .ServletContext

Mock ServletConfig

Field Summary

Modifier and TypeField and Description
private final Map<String, String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getInitParameter(String
the name of the initialization parameter whose value to get
name
)

Implements jakarta.servlet.ServletConfig.getInitParameter.

Gets the value of the initialization parameter with the given name.

public Enumeration<String>
getInitParameterNames()

Implements jakarta.servlet.ServletConfig.getInitParameterNames.

Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.

public ServletContext
getServletContext()

Implements jakarta.servlet.ServletConfig.getServletContext.

Returns a reference to the ServletContext in which the caller is executing.

public String
getServletName()

Implements jakarta.servlet.ServletConfig.getServletName.

Returns the name of this servlet instance.

public void
setInitParameter(String
parameter name
name
,
String
parameter value
value
)

Set init parameter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

parametersback to summary
private final Map<String, String> parameters

Constructor Detail

MockServletConfigback to summary
public MockServletConfig()

Method Detail

getInitParameterback to summary
public String getInitParameter(String name)

Implements jakarta.servlet.ServletConfig.getInitParameter.

Doc from jakarta.servlet.ServletConfig.getInitParameter.

Gets the value of the initialization parameter with the given name.

Parameters
name:String

the name of the initialization parameter whose value to get

Returns:String

a String containing the value of the initialization parameter, or null if the initialization parameter does not exist

Annotations
@Override
getInitParameterNamesback to summary
public Enumeration<String> getInitParameterNames()

Implements jakarta.servlet.ServletConfig.getInitParameterNames.

Doc from jakarta.servlet.ServletConfig.getInitParameterNames.

Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.

Returns:Enumeration<String>

an Enumeration of String objects containing the names of the servlet's initialization parameters

Annotations
@Override
getServletContextback to summary
public ServletContext getServletContext()

Implements jakarta.servlet.ServletConfig.getServletContext.

Doc from jakarta.servlet.ServletConfig.getServletContext.

Returns a reference to the ServletContext in which the caller is executing.

Returns:ServletContext

a ServletContext object, used by the caller to interact with its servlet container

Annotations
@Override
getServletNameback to summary
public String getServletName()

Implements jakarta.servlet.ServletConfig.getServletName.

Doc from jakarta.servlet.ServletConfig.getServletName.

Returns the name of this servlet instance. The name may be provided via server administration, assigned in the web application deployment descriptor, or for an unregistered (and thus unnamed) servlet instance it will be the servlet's class name.

Returns:String

the name of the servlet instance

Annotations
@Override
setInitParameterback to summary
public void setInitParameter(String name, String value)

Set init parameter.

Parameters
name:String

parameter name

value:String

parameter value