FileDocCategorySizeDatePackage
SipFactory.javaAPI DocphoneME MR2 API (J2ME)3412Wed May 02 18:00:42 BST 2007gov.nist.siplite

SipFactory

public class SipFactory extends Object
Main SIP factory for instance classes.

Fields Summary
private static SipFactory
myFactory
Main SIP factory.
private static AddressFactory
addressFactory
Address factory.
private static MessageFactory
msgFactory
Messgae factory.
private static HeaderFactory
headerFactory
Header factoey.
Constructors Summary
private SipFactory()
Default private constructor (singleton).

        // Dont let outsiders call me!
    
Methods Summary
public AddressFactorycreateAddressFactory()
Creates a address factory.

return
handle to address factory handler

        if (addressFactory != null)
            return addressFactory;
        addressFactory = new AddressFactory();
        return addressFactory;
    
public HeaderFactorycreateHeaderFactory()
Creates a header factory.

return
handle to header factory handler

        if (headerFactory != null)
            return headerFactory;
        headerFactory = new HeaderFactory();
        return headerFactory;
    
public MessageFactorycreateMessageFactory()
Creates a mesage factory.

return
handle to message factory handler

        if (msgFactory != null)
            return msgFactory;
        msgFactory =  new MessageFactory();
        return msgFactory;
    
public SipStackcreateSipStack(ConfigurationProperties properties, com.sun.midp.security.SecurityToken classSecurityToken)
Creates a SIP Stack based on requested properties.

param
properties configuration of current SIP STack
param
classSecurityToken SecurityToken object for saving
return
SIP Stack context

        return new SipStack(properties, classSecurityToken);
    
public static gov.nist.siplite.SipFactorygetInstance()
Gets a handle the the SIP factory handler.

return
handle to the SIP factory singelton

        if (myFactory == null) myFactory = new SipFactory();
        return myFactory;