org.jdiameter.client.api
Interface ISessionFactory

All Superinterfaces:
SessionFactory
All Known Implementing Classes:
SessionFactoryImpl

public interface ISessionFactory
extends SessionFactory

This interface describe extends methods of base class

Version:
1.5.0.1
Author:
erick.svenson@yahoo.com, Alexandre Mendonca , Bartosz Baranowski

Method Summary
 IAppSessionFactory getAppSessionFactory(java.lang.Class<? extends AppSession> sessionClass)
          Retrieves the app session factory associated with an app session class
 IContainer getContainer()
           
<T extends AppSession>
T
getNewAppSession(java.lang.String sessionId, ApplicationId applicationId, java.lang.Class<? extends AppSession> aClass, java.lang.Object... args)
          Method used for creating a new App Session using the specified class with the desired Application Id and Session Id.
 void registerAppFacory(java.lang.Class<? extends AppSession> sessionClass, IAppSessionFactory factory)
          Registers a new App Session factory.
 void unRegisterAppFacory(java.lang.Class<? extends AppSession> sessionClass)
          Unregisters an existing App Session factory.
 
Methods inherited from interface org.jdiameter.api.SessionFactory
getNewAppSession, getNewAppSession, getNewRawSession, getNewSession, getNewSession, getSessionId, getSessionId
 

Method Detail

getNewAppSession

<T extends AppSession> T getNewAppSession(java.lang.String sessionId,
                                          ApplicationId applicationId,
                                          java.lang.Class<? extends AppSession> aClass,
                                          java.lang.Object... args)
                                      throws InternalException
Method used for creating a new App Session using the specified class with the desired Application Id and Session Id.

Parameters:
sessionId - the session-id for this App Session, if desired
applicationId - the application id for this session
aClass - the class of the app session object
args -
Returns:
an AppSession instance
Throws:
InternalException

registerAppFacory

void registerAppFacory(java.lang.Class<? extends AppSession> sessionClass,
                       IAppSessionFactory factory)
Registers a new App Session factory.

Parameters:
sessionClass - the class of the objects being generated by the factory
factory - the factory to generate app sessions

unRegisterAppFacory

void unRegisterAppFacory(java.lang.Class<? extends AppSession> sessionClass)
Unregisters an existing App Session factory.

Parameters:
sessionClass - the class identifier for this factory

getAppSessionFactory

IAppSessionFactory getAppSessionFactory(java.lang.Class<? extends AppSession> sessionClass)
Retrieves the app session factory associated with an app session class

Parameters:
sessionClass - the class identifier for the desired factory
Returns:
the App Session Factory instance if registered, null if no factory is registered for such class

getContainer

IContainer getContainer()
Returns:


Copyright © 2014. All Rights Reserved.