Skip navigation links

Oracle Communications Service Broker
SAL API Reference Reference
Release 6.0

E26227-01


com.convergin.common.sal.ext.api
Interface SalSession


public interface SalSession

Represents point-to-point SAL relationships.

All messages are potentially associated with a SalSession. The SalSession can be retrieved from the message by calling SalMessage.getSession().


Method Summary
 SalRequest createRequest(java.lang.String method)
          Returns a new request object.
 SalApplicationSession getApplicationSession()
          Returns the application session with which this SalSession is associated.
 java.lang.Object getAttribute(java.lang.String name)
          Returns the object bound with the specified name in this session, or null if no object is bound under the name.
 java.lang.String getId()
           
 void invalidate()
          Invalidates this session and unbinds any objects bound to it.
 boolean isValid()
          Returns true if this SalSession is valid, false otherwise.
 void removeAttribute(java.lang.String name)
          Removes the object bound with the specified name from this session.
 void setAttribute(java.lang.String name, java.lang.Object attribute)
          Binds an object to this session, using the name specified.

 

Method Detail

invalidate

void invalidate()
Invalidates this session and unbinds any objects bound to it.

getApplicationSession

SalApplicationSession getApplicationSession()
Returns the application session with which this SalSession is associated. If none exists, then a new one is created and returned after associating it with this SalSession.
Returns:
the application session for this SalSession

createRequest

SalRequest createRequest(java.lang.String method)
Returns a new request object.

Note that this method must not be used to create ACK or CANCEL requests. User agents create ACKs by calling SalResponse.createAck() and CANCELs are created by calling SalRequest.createCancel().

Parameters:
method - the SAL method of the new request
Returns:
the new request object

isValid

boolean isValid()
Returns true if this SalSession is valid, false otherwise. The SalSession can be invalidated by calling the method invalidate() on it.
Returns:
true if the session is valid, false otherwise.

getId

java.lang.String getId()

getAttribute

java.lang.Object getAttribute(java.lang.String name)
Returns the object bound with the specified name in this session, or null if no object is bound under the name.
Parameters:
name - a string specifying the name of the object
Returns:
the object with the specified name

setAttribute

void setAttribute(java.lang.String name,
                  java.lang.Object attribute)
Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.
Parameters:
name - the name to which the object is bound, cannot be null
attribute - the object to be bound, cannot be null

removeAttribute

void removeAttribute(java.lang.String name)
Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.
Parameters:
name - the name of the object to remove from this session

Skip navigation links

Oracle Communications Service Broker
SAL API Reference Reference
Release 6.0

E26227-01


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.