PHP 클래스 AppserverIo\Appserver\ServletEngine\ServletManager

상속: extends AppserverIo\Appserver\Core\AbstractEpbManager, implements AppserverIo\Psr\Servlet\ServletContextInterface, implements AppserverIo\Appserver\Application\Interfaces\ManagerSettingsAwareInterface
파일 보기 프로젝트 열기: appserver-io/appserver 1 사용 예제들

공개 메소드들

메소드 설명
addErrorPage ( string $errorCodePattern, string $errorLocation ) : void Registers the error page under the passed error code.
addInitParameter ( string $name, string $value ) : void Registers the init parameter under the passed name.
addServlet ( string $key, AppserverIo\Psr\Servlet\ServletInterface $servlet ) : void Registers a servlet under the passed key.
addServletMapping ( string $pattern, string $servletName ) : void Adds an URL mapping for a servlet.
addSessionParameter ( string $name, string $value ) : void Registers the session parameter under the passed name.
getDirectories ( ) : array Returns all the additional directories to be parsed for servlets.
getErrorPages ( ) : AppserverIo\Storage\StorageInterface Returns the container with the error page configuration.
getIdentifier ( ) : string Returns the identifier for the servlet manager instance.
getInitParameter ( string $name ) : null | string Returns the init parameter with the passed name.
getManagerSettings ( ) : AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface Return's the servlet manager settings.
getResourceLocator ( ) : AppserverIo\Appserver\ServletEngine\ResourceLocatorInterface Return the resource locator instance.
getSecuredUrlConfigs ( ) : array Returns the webapps security context configurations.
getServlet ( string $key ) : AppserverIo\Psr\Servlet\ServletInterface Returns the servlet with the passed name.
getServletByMapping ( string $urlMapping ) : AppserverIo\Psr\Servlet\ServletInterface Returns the servlet for the passed URL mapping.
getServletLocator ( ) : AppserverIo\Appserver\ServletEngine\ResourceLocatorInterface Returns the resource locator for the servlets.
getServletMappings ( ) : AppserverIo\Storage\GenericStackable Returns the servlet mappings found in the configuration file.
getServlets ( ) : array Returns all servlets
getSessionParameter ( string $name ) : null | string Returns the session parameter with the passed name.
hasSessionParameters ( ) : boolean Returns TRUE if we've at least one session parameter configured, else FALSE.
initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Has been automatically invoked by the container after the application instance has been created.
injectDirectories ( array $directories ) : void Injects the additional directories to be parsed when looking for servlets.
injectErrorPages ( AppserverIo\Storage\StorageInterface $errorPages ) : void Injects the container for the error page configuration.
injectInitParameters ( AppserverIo\Storage\StorageInterface $initParameters ) : void Injects the container for the init parameters.
injectManagerSettings ( AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface $managerSettings ) : void Injects the servlet manager settings.
injectResourceLocator ( AppserverIo\Appserver\ServletEngine\ResourceLocatorInterface $resourceLocator ) : void Injects the resource locator that locates the requested servlet.
injectSecuredUrlConfigs ( AppserverIo\Storage\StorageInterface $securedUrlConfigs ) : void Injects the container for the secured URL configurations.
injectServletMappings ( AppserverIo\Storage\GenericStackable $servletMappings ) : void Injects the container for the servlet mappings.
injectServlets ( AppserverIo\Storage\StorageInterface $servlets ) : void Injects the container for the servlets.
injectSessionParameters ( AppserverIo\Storage\StorageInterface $sessionParameters ) : void Injects the container for the session parameters.
locate ( AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface $servletRequest, array $args = [] ) : AppserverIo\Psr\Servlet\ServletInterface Tries to locate the resource related with the request.
lookup ( string $servletPath, string $sessionId = null, array $args = [] ) : AppserverIo\Psr\Servlet\GenericServlet Runs a lookup for the servlet with the passed class name and session ID.
registerServlet ( AppserverIo\Psr\Servlet\Description\ServletDescriptorInterface $descriptor ) : void Register the servlet described by the passed descriptor.
registerServlets ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Finds all servlets which are provided by the webapps and initializes them.

메소드 상세

addErrorPage() 공개 메소드

Registers the error page under the passed error code.
public addErrorPage ( string $errorCodePattern, string $errorLocation ) : void
$errorCodePattern string The error code for the page
$errorLocation string The error page location
리턴 void

addInitParameter() 공개 메소드

Registers the init parameter under the passed name.
public addInitParameter ( string $name, string $value ) : void
$name string Name to register the init parameter with
$value string The value of the init parameter
리턴 void

addServlet() 공개 메소드

Registers a servlet under the passed key.
public addServlet ( string $key, AppserverIo\Psr\Servlet\ServletInterface $servlet ) : void
$key string The servlet to key to register with
$servlet AppserverIo\Psr\Servlet\ServletInterface The servlet to be registered
리턴 void

addServletMapping() 공개 메소드

Adds an URL mapping for a servlet.
public addServletMapping ( string $pattern, string $servletName ) : void
$pattern string The URL pattern we want the servlet to map to
$servletName string The servlet name to map
리턴 void

addSessionParameter() 공개 메소드

Registers the session parameter under the passed name.
public addSessionParameter ( string $name, string $value ) : void
$name string Name to register the session parameter with
$value string The value of the session parameter
리턴 void

getDirectories() 공개 메소드

Returns all the additional directories to be parsed for servlets.
public getDirectories ( ) : array
리턴 array The additional directories

getErrorPages() 공개 메소드

Returns the container with the error page configuration.
public getErrorPages ( ) : AppserverIo\Storage\StorageInterface
리턴 AppserverIo\Storage\StorageInterface The container with the error page configuration

getIdentifier() 공개 메소드

Returns the identifier for the servlet manager instance.
또한 보기: AppserverIo\Psr\Application\ManagerInterface::getIdentifier()
public getIdentifier ( ) : string
리턴 string

getInitParameter() 공개 메소드

Returns the init parameter with the passed name.
public getInitParameter ( string $name ) : null | string
$name string Name of the init parameter to return
리턴 null | string

getManagerSettings() 공개 메소드

Return's the servlet manager settings.
public getManagerSettings ( ) : AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface
리턴 AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface The servlet manager settings

getResourceLocator() 공개 메소드

Return the resource locator instance.
public getResourceLocator ( ) : AppserverIo\Appserver\ServletEngine\ResourceLocatorInterface
리턴 AppserverIo\Appserver\ServletEngine\ResourceLocatorInterface The resource locator instance

getSecuredUrlConfigs() 공개 메소드

Returns the webapps security context configurations.
public getSecuredUrlConfigs ( ) : array
리턴 array The security context configurations

getServlet() 공개 메소드

Returns the servlet with the passed name.
public getServlet ( string $key ) : AppserverIo\Psr\Servlet\ServletInterface
$key string The name of the servlet to return
리턴 AppserverIo\Psr\Servlet\ServletInterface The servlet instance

getServletByMapping() 공개 메소드

Returns the servlet for the passed URL mapping.
public getServletByMapping ( string $urlMapping ) : AppserverIo\Psr\Servlet\ServletInterface
$urlMapping string The URL mapping to return the servlet for
리턴 AppserverIo\Psr\Servlet\ServletInterface The servlet instance

getServletLocator() 공개 메소드

Returns the resource locator for the servlets.
public getServletLocator ( ) : AppserverIo\Appserver\ServletEngine\ResourceLocatorInterface
리턴 AppserverIo\Appserver\ServletEngine\ResourceLocatorInterface The resource locator for the servlets

getServletMappings() 공개 메소드

Returns the servlet mappings found in the configuration file.
public getServletMappings ( ) : AppserverIo\Storage\GenericStackable
리턴 AppserverIo\Storage\GenericStackable The servlet mappings

getServlets() 공개 메소드

Returns all servlets
public getServlets ( ) : array
리턴 array The servlets collection

getSessionParameter() 공개 메소드

Returns the session parameter with the passed name.
public getSessionParameter ( string $name ) : null | string
$name string Name of the session parameter to return
리턴 null | string

hasSessionParameters() 공개 메소드

Returns TRUE if we've at least one session parameter configured, else FALSE.
public hasSessionParameters ( ) : boolean
리턴 boolean TRUE if we've at least one session parameter configured, else FALSE

initialize() 공개 메소드

Has been automatically invoked by the container after the application instance has been created.
또한 보기: AppserverIo\Psr\Application\ManagerInterface::initialize()
public initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
리턴 void

injectDirectories() 공개 메소드

Injects the additional directories to be parsed when looking for servlets.
public injectDirectories ( array $directories ) : void
$directories array The additional directories to be parsed
리턴 void

injectErrorPages() 공개 메소드

Injects the container for the error page configuration.
public injectErrorPages ( AppserverIo\Storage\StorageInterface $errorPages ) : void
$errorPages AppserverIo\Storage\StorageInterface The container for the error page configuration
리턴 void

injectInitParameters() 공개 메소드

Injects the container for the init parameters.
public injectInitParameters ( AppserverIo\Storage\StorageInterface $initParameters ) : void
$initParameters AppserverIo\Storage\StorageInterface The container for the init parameters
리턴 void

injectManagerSettings() 공개 메소드

Injects the servlet manager settings.
public injectManagerSettings ( AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface $managerSettings ) : void
$managerSettings AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface The servlet manager settings
리턴 void

injectResourceLocator() 공개 메소드

Injects the resource locator that locates the requested servlet.
public injectResourceLocator ( AppserverIo\Appserver\ServletEngine\ResourceLocatorInterface $resourceLocator ) : void
$resourceLocator AppserverIo\Appserver\ServletEngine\ResourceLocatorInterface The resource locator
리턴 void

injectSecuredUrlConfigs() 공개 메소드

Injects the container for the secured URL configurations.
public injectSecuredUrlConfigs ( AppserverIo\Storage\StorageInterface $securedUrlConfigs ) : void
$securedUrlConfigs AppserverIo\Storage\StorageInterface The container for the secured URL configurations
리턴 void

injectServletMappings() 공개 메소드

Injects the container for the servlet mappings.
public injectServletMappings ( AppserverIo\Storage\GenericStackable $servletMappings ) : void
$servletMappings AppserverIo\Storage\GenericStackable The container for the servlet mappings
리턴 void

injectServlets() 공개 메소드

Injects the container for the servlets.
public injectServlets ( AppserverIo\Storage\StorageInterface $servlets ) : void
$servlets AppserverIo\Storage\StorageInterface The container for the servlets
리턴 void

injectSessionParameters() 공개 메소드

Injects the container for the session parameters.
public injectSessionParameters ( AppserverIo\Storage\StorageInterface $sessionParameters ) : void
$sessionParameters AppserverIo\Storage\StorageInterface The container for the session parameters
리턴 void

locate() 공개 메소드

Tries to locate the resource related with the request.
또한 보기: AppserverIo\Appserver\ServletEngine\ResourceLocator::locate()
public locate ( AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface $servletRequest, array $args = [] ) : AppserverIo\Psr\Servlet\ServletInterface
$servletRequest AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface The request instance to return the servlet for
$args array The arguments passed to the servlet constructor
리턴 AppserverIo\Psr\Servlet\ServletInterface The requested servlet

lookup() 공개 메소드

Runs a lookup for the servlet with the passed class name and session ID.
public lookup ( string $servletPath, string $sessionId = null, array $args = [] ) : AppserverIo\Psr\Servlet\GenericServlet
$servletPath string The servlet path
$sessionId string The session ID
$args array The arguments passed to the servlet constructor
리턴 AppserverIo\Psr\Servlet\GenericServlet The requested servlet

registerServlet() 공개 메소드

Register the servlet described by the passed descriptor.
public registerServlet ( AppserverIo\Psr\Servlet\Description\ServletDescriptorInterface $descriptor ) : void
$descriptor AppserverIo\Psr\Servlet\Description\ServletDescriptorInterface The servlet descriptor
리턴 void

registerServlets() 공개 메소드

Finds all servlets which are provided by the webapps and initializes them.
public registerServlets ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
리턴 void