org.jdiameter.api
Interface SessionFactory


public interface SessionFactory

This class created session instance (Factory)

Version:
1.5.1 Final

Method Summary
<T extends AppSession>
T
getNewAppSession(ApplicationId applicationId, java.lang.Class<? extends AppSession> userSession)
          Create new vendor specific application session Use this method for create specific application sessions Example: ClientShSession session = factory.getNewSession(appId, ClientShSession.class)
<T extends AppSession>
T
getNewAppSession(java.lang.String sessionId, ApplicationId applicationId, java.lang.Class<? extends AppSession> userSession)
          Create new vendor specific application session with predefined sessionId, origination host/realm names.
 RawSession getNewRawSession()
          Create new raw session instance
 Session getNewSession()
          Create new session with new session id
 Session getNewSession(java.lang.String sessionId)
          Create new session with predefined sessionId You can create special sessions to work on distributed systems
 

Method Detail

getNewRawSession

RawSession getNewRawSession()
                            throws InternalException
Create new raw session instance

Returns:
session instance of session
Throws:
InternalException - if a error occurs

getNewSession

Session getNewSession()
                      throws InternalException
Create new session with new session id

Returns:
session instance of session
Throws:
InternalException - if a error occurs

getNewSession

Session getNewSession(java.lang.String sessionId)
                      throws InternalException
Create new session with predefined sessionId You can create special sessions to work on distributed systems

Parameters:
sessionId - instance of session
Returns:
session instance of session
Throws:
InternalException - if a error occurs

getNewAppSession

<T extends AppSession> T getNewAppSession(ApplicationId applicationId,
                                          java.lang.Class<? extends AppSession> userSession)
                                      throws InternalException
Create new vendor specific application session Use this method for create specific application sessions Example: ClientShSession session = factory.getNewSession(appId, ClientShSession.class)

Parameters:
applicationId - predefined application id
userSession - A Class defining an interface that the result must implement.
Returns:
session instance
Throws:
InternalException - if a error occurs

getNewAppSession

<T extends AppSession> T getNewAppSession(java.lang.String sessionId,
                                          ApplicationId applicationId,
                                          java.lang.Class<? extends AppSession> userSession)
                                      throws InternalException
Create new vendor specific application session with predefined sessionId, origination host/realm names. You can create special sessions to work on distributed systems Use this method for create specific application sessions Example: ClientShSession session = factory.getNewSession(appId, ClientShSession.class)

Parameters:
sessionId - instance of session
applicationId - predefined application id
userSession - A Class defining an interface that the result must implement.
Returns:
session instance
Throws:
InternalException - if a error occurs


Copyright © 2009. All Rights Reserved.