org.jdiameter.api
Interface SessionFactory


public interface SessionFactory

This class created session instance (Factory)

Version:
1.5.1 Final
Author:
erick.svenson@yahoo.com

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
 java.lang.String getSessionId()
          Generates new session id which can be used as argument in getNewSession(String) or getNewAppSession(String, ApplicationId, Class).
 java.lang.String getSessionId(java.lang.String customPart)
          See getSessionId().
 

Method Detail

getSessionId

java.lang.String getSessionId()
Generates new session id which can be used as argument in getNewSession(String) or getNewAppSession(String, ApplicationId, Class).

Returns:
new id for session.
Since:
1.5.4.1-build416

getSessionId

java.lang.String getSessionId(java.lang.String customPart)
See getSessionId(). This method has similar semantics, it adds custom part to id.

Parameters:
customPart -
Returns:
Since:
1.5.4.1-build416

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 © 2013. All Rights Reserved.