com.sap.mdm.session
Interface MdmSessionContext

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractSessionContext

public interface MdmSessionContext
extends Serializable

This is a common interface for three implementations: ServerSessionContext, RepositorySessionContext and UserSessionContext. Each implementation class stores context information needed for establishing connection to MDM server and for creating and authentication session of correspondent type.

See Also:
ServerSessionContext, RepositorySessionContext, UserSessionContext

Method Summary
 String getApplicationId()
          Deprecated. This method is replaced with getApplicationName() method
 String getApplicationName()
          Returns unique application name.
 int getConnectionType()
          Returns the connection type
 String getContextIdentifier()
          Returns unique context identifier.
 String getFullyQualifiedServerName()
          Returns the fully qualified MDM server name that consists of the fully qualified host name and port delimited by ':'
 String getServerName()
          Returns the name of MDM server
 MdmSecureSocketFactory getSocketFactory()
          Returns the instance of MdmSocketFactory used for creating a secure socket
 boolean isTrustedConnection()
          Indicates if connection should be created as trusted connection In this case the user password does not play a role
 void readFromString(String contextString)
          Initializes context state from the binary string representation of context object.
 void setApplicationId(String applicationId)
          Deprecated. This method is replaced with setApplicationName(String) method
 void setApplicationName(String applicationName)
          Sets the unique application Name.
 void setConnectionType(int connectionType)
          Sets the connection type
 void setContextIdentifier(String contextIdentifier)
          Sets the unique context identifier (for example, HttpSession ID) This is optional property.
 void setSocketFactory(MdmSecureSocketFactory socketFactory)
          Sets MdmSocketFactory that will be used for creating a secure socket
 void setTrustedConnection(boolean isTrustedConnection)
          Sets connection as trusted connection In this case the user password does not play a role
 String writeToString()
          Creates binary string representation of the context object.
 

Method Detail

getServerName

public String getServerName()
Returns the name of MDM server

Returns:
the MDM server name

isTrustedConnection

public boolean isTrustedConnection()
Indicates if connection should be created as trusted connection In this case the user password does not play a role

Returns:
true if connection should be trusted, false otherwise

setTrustedConnection

public void setTrustedConnection(boolean isTrustedConnection)
Sets connection as trusted connection In this case the user password does not play a role

Parameters:
isTrustedConnection - true if connection should be trusted

getConnectionType

public int getConnectionType()
Returns the connection type

Returns:
the connection type
See Also:
for connection type constants

setConnectionType

public void setConnectionType(int connectionType)
Sets the connection type

Parameters:
connectionType - the connection type
See Also:
for connection type constants

getApplicationId

public String getApplicationId()
Deprecated. This method is replaced with getApplicationName() method


getApplicationName

public String getApplicationName()
Returns unique application name. This is optional property used while creating a new session through the SessionManager It also is used when the MdmPasswordStorage is used in SessionManager. By default the application ID is null.

Returns:
the application name
See Also:
SessionManager, MdmPasswordStorage

setApplicationId

public void setApplicationId(String applicationId)
Deprecated. This method is replaced with setApplicationName(String) method


setApplicationName

public void setApplicationName(String applicationName)
Sets the unique application Name. This is optional property used while creating a new session through the SessionManager It also is used when the MdmPasswordStorage is used in SessionManager. By default the application Name is null.

Parameters:
applicationName - the unique application name
See Also:
SessionManager, MdmPasswordStorage

getContextIdentifier

public String getContextIdentifier()
Returns unique context identifier. This is optional property. By default the context identifier is null.

Returns:
the application ID
See Also:
SessionManager, MdmPasswordStorage

setContextIdentifier

public void setContextIdentifier(String contextIdentifier)
Sets the unique context identifier (for example, HttpSession ID) This is optional property. By default the context identifier is null. If this parameter is specified then the instance of the context is identified by combination of server name + repository name + user name + context identifier, otherwise the context is identified by object reference.

Parameters:
contextIdentifier - the unique context identifier
See Also:
SessionManager, MdmPasswordStorage

getSocketFactory

public MdmSecureSocketFactory getSocketFactory()
Returns the instance of MdmSocketFactory used for creating a secure socket

Returns:
the instance of MdmSocketFactory

setSocketFactory

public void setSocketFactory(MdmSecureSocketFactory socketFactory)
Sets MdmSocketFactory that will be used for creating a secure socket

Parameters:
socketFactory - the instance of MdmSocketFactory

writeToString

public String writeToString()
                     throws IOException
Creates binary string representation of the context object.

Returns:
string representation of context object.
Throws:
IOException
See Also:
readFromString(String)

readFromString

public void readFromString(String contextString)
                    throws IOException,
                           ClassNotFoundException
Initializes context state from the binary string representation of context object.

Parameters:
contextString - string representation of context object.
Throws:
IOException
ClassNotFoundException
See Also:
writeToString()

getFullyQualifiedServerName

public String getFullyQualifiedServerName()
Returns the fully qualified MDM server name that consists of the fully qualified host name and port delimited by ':'

Returns:
the fully qualified MDM server name


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.