JAIN TCAP API
v1.1 - 5th Sept 2001

jain.protocol.ss7
Class JainSS7Factory

java.lang.Object
  |
  +--jain.protocol.ss7.JainSS7Factory

public class JainSS7Factory
extends java.lang.Object

The JAIN(tm) SS7 Factory is a singleton class by which JAIN SS7 applications can obtain a proprietary (Peer) JAIN SS7 Object. The term 'peer' is Java nomenclature for "a particular platform-specific implementation of a Java interface or API". This term has the same meaning for the JAIN SS7 API specifications.
A Peer JAIN SS7 Object can be obtained from the JAIN SS7 Factory by ethier :

The JAIN SS7 Factory utilises a naming convention defined for each JAIN SS7 API to identify the location of proprietary JAIN SS7 Objects.

Under this convention the lower-level package structure and classname of a Peer JAIN SS7 Object is mandated by a convention defined within the JAIN SS7 API from which the Object originates.

For example: within the JAIN TCAP API, the lower-level package structure and classname of a proprietary implementation of the jain.protocol.ss7.tcap.JainTcapStack interface must be jain.protocol.ss7.tcap.JainTcapStackImpl.

Under the JAIN naming convention, the upper-level package structure (pathname) can be used to differentiate between proprietary implementations from different SS7 Vendors. The pathname used by each SS7 Vendor must be the domain name assigned to the Vendor in reverse order, e.g. Sun Microsystem's would be 'com.sun'

It follows that a proprietary implementation of a JAIN SS7 Object can be located at:
'pathname'.'lower-level package structure and classname'

Where:

pathname = reverse domain name, e.g. com.sun'

lower-level package structure and classname = mandated naming convention for the JAIN SS7 Object in question

e.g. jain.protocol.ss7.tcap.JainTcapStackImpl is the mandated naming convention for jain.protocol.ss7.tcap.JainTcapStack.

The resulting Peer JAIN SS7 Object would be located at: com.sun.jain.protocol.ss7.tcap.JainTcapStackImpl
Because the space of domain names is managed, this scheme ensures that collisions between two different vendor's implementations will not happen. For example: a different Vendor with a domain name 'foo.com' would have their Peer JainTcapStack Object located at com.foo.jain.protocol.ss7.tcap.JainTcapStackImpl.
This is a similar concept to the JAVA conventions used for managing package names.

The pathname is defaulted to 'com.sun' but may be set using the setPathName() method. This allows a JAIN application to switch between different Vendor implementations, as well as providing the capability to use the default or current pathname.

The JAIN SS7 Factory is a Singleton class. This means that there will only be one instance of the class with a global point of access to it. The single instance of the JAIN SS7 Factory can be obtained using the getInstance() method. In this way, the JAIN SS7 Factory can acts a single point obtaining JAIN SS7 Objects.

Version:
1.1
Author:
Sun Microsystems Inc.

Method Summary
 java.lang.Object createSS7Object(java.lang.String objectClassName)
          Returns an instance of a Peer JAIN SS7 Object identified by the supplied classname.
static JainSS7Factory getInstance()
          Returns an instance of a JainSS7Factory.
 java.util.Vector getJainObjectList()
          Returns a Vector containing all of the Peer JAIN Objects that have previously been created using this JainSS7Factory.
 java.lang.String getPathName()
          Returns the current Pathname.
 void setPathName(java.lang.String pathname)
          Sets the Pathname that identifies the location of a particular Vendor's implementation of the JAIN SS7 Objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JainSS7Factory getInstance()
Returns an instance of a JainSS7Factory. This is a singleton type class so this method is the global access point for the JainSS7Factory.
Returns:
the single instance of this singleton JainSS7Factory

setPathName

public void setPathName(java.lang.String pathname)
                 throws InvalidPathNameException
Sets the Pathname that identifies the location of a particular Vendor's implementation of the JAIN SS7 Objects. The pathname must be the domain name assigned to the Vendor providing the implementation in reverse order.
Parameters:
pathname - the reverse domain name of the Vendor. e.g. Sun Microsystem's would be 'com.sun'

getPathName

public java.lang.String getPathName()
Returns the current Pathname. The pathname identifies the location of a particular Vendor's implementation of the JAIN SS7 Objects. The pathname will always be the domain name assigned to the Vendor providing the implementation in reverse order.
Returns:
the pathname

createSS7Object

public java.lang.Object createSS7Object(java.lang.String objectClassName)
                                 throws PeerUnavailableException
Returns an instance of a Peer JAIN SS7 Object identified by the supplied classname. This supplied classname is the lower-level package structure and classname of the required Peer JAIN SS7 Object. This classname is mandated by a convention defined within the JAIN SS7 API from which the Object originates.

For example: To create an instance of the jain.protocol.ss7.tcap.JainTcapStack from the JAIN TCAP API, the supplied classname will be jain.protocol.ss7.tcap.JainTcapStackImpl.

Under the JAIN naming convention, the upper-level package structure (pathname) can be used to differentiate between proprietary implementations from different SS7 Vendors.

The location of the returned JAIN SS7 Object is dependent on the current pathname and the supplied classname.

If the specified class does not exist or is not installed in the CLASSPATH a PeerUnavailableException exception is thrown.

Once a Peer SS7 Object is created an object reference to the newly created object is stored along with object refernces to any other Peer SS7 Objects that have previously been created by this JainSS7Factory. This list of Peer SS7 Objects may be retrieved at any time using the getJainObjectList() method.

Parameters:
objectClassName - lower-level package structure and classname of the Peer JAIN SS7 Object class that is mandated by a convention defined within the JAIN SS7 API from which the Object originates.
Returns:
An instance of a Peer JAIN SS7 Object.
Throws:
PeerUnavailableException - Indicates that the Peer JAIN SS7 Object specified by the classname and the current pathname cannot be located.

getJainObjectList

public java.util.Vector getJainObjectList()
Returns a Vector containing all of the Peer JAIN Objects that have previously been created using this JainSS7Factory.

NOTE: The Vector returned may contain Objects of any type that may have been created through this factory.

Returns:
a vector containing all JAIN SS7 Objects created through this JAIN SS7 Factory.

JAIN TCAP API
v1.1 - 5th Sept 2001

Email comments to [email protected]