PHP Класс AppserverIo\Appserver\PersistenceContainer\BeanManager

Автор: Bernhard Wick ([email protected])
Автор: Tim Wagner ([email protected])
Наследование: extends AppserverIo\Appserver\Core\AbstractEpbManager, implements AppserverIo\Psr\EnterpriseBeans\BeanContextInterface, implements AppserverIo\Appserver\Application\Interfaces\ManagerSettingsAwareInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
attach ( object $instance, string $sessionId = null ) : void Attaches the passed bean, depending on it's type to the container.
destroyBeanInstance ( object $instance ) : void Invokes the bean method with a pre-destroy callback.
getDirectories ( ) : array Returns all the additional directories to be parsed for servlets.
getGarbageCollector ( ) : StandardGarbageCollector Returns the garbage collector instance.
getIdentifier ( ) : string Returns the identifier for the bean manager instance.
getManagerSettings ( ) : AppserverIo\Appserver\PersistenceContainer\PersistenceContainerSettingsInterface Return's the bean manager settings.
getNamingDirectory ( ) : AppserverIo\Storage\StorageInterface Return the storage with the naming directory.
getObjectFactory ( ) : AppserverIo\Appserver\PersistenceContainer\ObjectFactoryInterface Returns the object factory instance.
getResourceLocator ( ) : AppserverIo\Psr\EnterpriseBeans\ResourceLocatorInterface Return the resource locator instance.
getSingletonSessionBeans ( ) : AppserverIo\Storage\StorageInterface Return the storage with the singleton session beans.
getStatefulSessionBeans ( ) : AppserverIo\Storage\StorageInterface Return the storage with the stateful session beans.
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.
injectGarbageCollector ( StandardGarbageCollector $garbageCollector ) : void Injects the garbage collector.
injectManagerSettings ( AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface $managerSettings ) : void Injects the bean manager settings.
injectObjectFactory ( AppserverIo\Appserver\PersistenceContainer\ObjectFactoryInterface $objectFactory ) : void Injects the object factory instance.
injectResourceLocator ( AppserverIo\Psr\EnterpriseBeans\ResourceLocatorInterface $resourceLocator ) : void Injects the resource locator to lookup the requested queue.
injectSingletonSessionBeans ( AppserverIo\Storage\StorageInterface $singletonSessionBeans ) : void Injects the storage for the singleton session beans.
injectStatefulSessionBeans ( AppserverIo\Storage\StorageInterface $statefulSessionBeans ) : void Injects the storage for the stateful session beans.
invoke ( AppserverIo\RemoteMethodInvocation\RemoteMethodInterface $remoteMethod, AppserverIo\Collections\CollectionInterface $sessions ) : mixed Invoke the passed remote method on the described session bean and return the result.
lookup ( string $className, string $sessionId = null, array $args = [] ) : object Runs a lookup for the session bean with the passed class name and session ID.
lookupSingletonSessionBean ( string $className ) : object | null Retrieves the requested singleton session bean.
lookupStatefulSessionBean ( string $sessionId, string $className ) : object | null Retrieves the requested stateful session bean.
newAnnotationInstance ( AppserverIo\Lang\Reflection\AnnotationInterface $annotation ) : AppserverIo\Lang\Reflection\AnnotationInterface Creates a new new instance of the annotation type, defined in the passed reflection annotation.
newSingletonSessionBeanInstance ( string $className, string | null $sessionId = null, array $args = [] ) : object Returns a new instance of the SSB with the passed class name.
registerBean ( AppserverIo\Psr\EnterpriseBeans\Description\BeanDescriptorInterface $descriptor ) : void Register the bean described by the passed descriptor.
registerBeans ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Registers the message beans at startup.
removeStatefulSessionBean ( string $sessionId, string $className ) : void Removes the stateful session bean with the passed session-ID and class name from the bean manager.
stop ( ) : void Shutdown the session manager instance.

Описание методов

attach() публичный метод

Attaches the passed bean, depending on it's type to the container.
public attach ( object $instance, string $sessionId = null ) : void
$instance object The bean instance to attach
$sessionId string The session-ID when we have stateful session bean
Результат void

destroyBeanInstance() публичный метод

Invokes the bean method with a pre-destroy callback.
public destroyBeanInstance ( object $instance ) : void
$instance object The instance to invoke the method
Результат void

getDirectories() публичный метод

Returns all the additional directories to be parsed for servlets.
public getDirectories ( ) : array
Результат array The additional directories

getGarbageCollector() публичный метод

Returns the garbage collector instance.
public getGarbageCollector ( ) : StandardGarbageCollector
Результат StandardGarbageCollector The garbage collector instance

getIdentifier() публичный метод

Returns the identifier for the bean manager instance.
См. также: AppserverIo\Psr\Application\ManagerInterface::getIdentifier()
public getIdentifier ( ) : string
Результат string

getManagerSettings() публичный метод

Return's the bean manager settings.
public getManagerSettings ( ) : AppserverIo\Appserver\PersistenceContainer\PersistenceContainerSettingsInterface
Результат AppserverIo\Appserver\PersistenceContainer\PersistenceContainerSettingsInterface The bean manager settings

getNamingDirectory() публичный метод

Return the storage with the naming directory.
public getNamingDirectory ( ) : AppserverIo\Storage\StorageInterface
Результат AppserverIo\Storage\StorageInterface The storage with the naming directory

getObjectFactory() публичный метод

Returns the object factory instance.
public getObjectFactory ( ) : AppserverIo\Appserver\PersistenceContainer\ObjectFactoryInterface
Результат AppserverIo\Appserver\PersistenceContainer\ObjectFactoryInterface The object factory instance

getResourceLocator() публичный метод

Return the resource locator instance.
public getResourceLocator ( ) : AppserverIo\Psr\EnterpriseBeans\ResourceLocatorInterface
Результат AppserverIo\Psr\EnterpriseBeans\ResourceLocatorInterface The resource locator instance

getSingletonSessionBeans() публичный метод

Return the storage with the singleton session beans.
public getSingletonSessionBeans ( ) : AppserverIo\Storage\StorageInterface
Результат AppserverIo\Storage\StorageInterface The storage with the singleton session beans

getStatefulSessionBeans() публичный метод

Return the storage with the stateful session beans.
public getStatefulSessionBeans ( ) : AppserverIo\Storage\StorageInterface
Результат AppserverIo\Storage\StorageInterface The storage with the stateful session beans

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

injectGarbageCollector() публичный метод

Injects the garbage collector.
public injectGarbageCollector ( StandardGarbageCollector $garbageCollector ) : void
$garbageCollector StandardGarbageCollector The garbage collector
Результат void

injectManagerSettings() публичный метод

Injects the bean manager settings.
public injectManagerSettings ( AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface $managerSettings ) : void
$managerSettings AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface The bean manager settings
Результат void

injectObjectFactory() публичный метод

Injects the object factory instance.
public injectObjectFactory ( AppserverIo\Appserver\PersistenceContainer\ObjectFactoryInterface $objectFactory ) : void
$objectFactory AppserverIo\Appserver\PersistenceContainer\ObjectFactoryInterface The object factory instance
Результат void

injectResourceLocator() публичный метод

Injects the resource locator to lookup the requested queue.
public injectResourceLocator ( AppserverIo\Psr\EnterpriseBeans\ResourceLocatorInterface $resourceLocator ) : void
$resourceLocator AppserverIo\Psr\EnterpriseBeans\ResourceLocatorInterface The resource locator
Результат void

injectSingletonSessionBeans() публичный метод

Injects the storage for the singleton session beans.
public injectSingletonSessionBeans ( AppserverIo\Storage\StorageInterface $singletonSessionBeans ) : void
$singletonSessionBeans AppserverIo\Storage\StorageInterface The storage for the singleton session beans
Результат void

injectStatefulSessionBeans() публичный метод

Injects the storage for the stateful session beans.
public injectStatefulSessionBeans ( AppserverIo\Storage\StorageInterface $statefulSessionBeans ) : void
$statefulSessionBeans AppserverIo\Storage\StorageInterface The storage for the stateful session beans
Результат void

invoke() публичный метод

Invoke the passed remote method on the described session bean and return the result.
public invoke ( AppserverIo\RemoteMethodInvocation\RemoteMethodInterface $remoteMethod, AppserverIo\Collections\CollectionInterface $sessions ) : mixed
$remoteMethod AppserverIo\RemoteMethodInvocation\RemoteMethodInterface The remote method description
$sessions AppserverIo\Collections\CollectionInterface The collection with the sessions
Результат mixed The result of the remote method invocation

lookup() публичный метод

If the passed class name is a session bean an instance will be returned.
public lookup ( string $className, string $sessionId = null, array $args = [] ) : object
$className string The name of the session bean's class
$sessionId string The session ID
$args array The arguments passed to the session beans constructor
Результат object The requested bean instance

lookupSingletonSessionBean() публичный метод

Retrieves the requested singleton session bean.
public lookupSingletonSessionBean ( string $className ) : object | null
$className string The class name of the session bean to retrieve
Результат object | null The singleton session bean if available

lookupStatefulSessionBean() публичный метод

Retrieves the requested stateful session bean.
public lookupStatefulSessionBean ( string $sessionId, string $className ) : object | null
$sessionId string The session-ID of the stateful session bean to retrieve
$className string The class name of the session bean to retrieve
Результат object | null The stateful session bean if available

newAnnotationInstance() публичный метод

Creates a new new instance of the annotation type, defined in the passed reflection annotation.
public newAnnotationInstance ( AppserverIo\Lang\Reflection\AnnotationInterface $annotation ) : AppserverIo\Lang\Reflection\AnnotationInterface
$annotation AppserverIo\Lang\Reflection\AnnotationInterface The reflection annotation we want to create the instance for
Результат AppserverIo\Lang\Reflection\AnnotationInterface The real annotation instance

newSingletonSessionBeanInstance() публичный метод

Returns a new instance of the SSB with the passed class name.
public newSingletonSessionBeanInstance ( string $className, string | null $sessionId = null, array $args = [] ) : object
$className string The fully qualified class name to return the instance for
$sessionId string | null The session-ID, necessary to inject stateful session beans (SFBs)
$args array Arguments to pass to the constructor of the instance
Результат object The instance itself

registerBean() публичный метод

Register the bean described by the passed descriptor.
public registerBean ( AppserverIo\Psr\EnterpriseBeans\Description\BeanDescriptorInterface $descriptor ) : void
$descriptor AppserverIo\Psr\EnterpriseBeans\Description\BeanDescriptorInterface The bean descriptor
Результат void

registerBeans() публичный метод

Registers the message beans at startup.
public registerBeans ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
Результат void

removeStatefulSessionBean() публичный метод

Removes the stateful session bean with the passed session-ID and class name from the bean manager.
public removeStatefulSessionBean ( string $sessionId, string $className ) : void
$sessionId string The session-ID of the stateful session bean to retrieve
$className string The class name of the session bean to retrieve
Результат void

stop() публичный метод

Shutdown the session manager instance.
public stop ( ) : void
Результат void \AppserverIo\Psr\Application\ManagerInterface::stop()