All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.nist.javax.sip.header.HeaderFactoryExt Maven / Gradle / Ivy

package gov.nist.javax.sip.header;

import java.text.ParseException;

import gov.nist.javax.sip.header.extensions.ReferredByHeader;
import gov.nist.javax.sip.header.extensions.ReplacesHeader;
import gov.nist.javax.sip.header.extensions.SessionExpiresHeader;
import gov.nist.javax.sip.header.ims.PAccessNetworkInfoHeader;
import gov.nist.javax.sip.header.ims.PAssertedIdentityHeader;
import gov.nist.javax.sip.header.ims.PAssociatedURIHeader;
import gov.nist.javax.sip.header.ims.PCalledPartyIDHeader;
import gov.nist.javax.sip.header.ims.PChargingFunctionAddressesHeader;
import gov.nist.javax.sip.header.ims.PChargingVectorHeader;
import gov.nist.javax.sip.header.ims.PMediaAuthorizationHeader;
import gov.nist.javax.sip.header.ims.PPreferredIdentityHeader;
import gov.nist.javax.sip.header.ims.PVisitedNetworkIDHeader;
import gov.nist.javax.sip.header.ims.PathHeader;
import gov.nist.javax.sip.header.ims.PrivacyHeader;
import gov.nist.javax.sip.header.ims.SecurityClientHeader;
import gov.nist.javax.sip.header.ims.SecurityServerHeader;
import gov.nist.javax.sip.header.ims.SecurityVerifyHeader;
import gov.nist.javax.sip.header.ims.ServiceRouteHeader;

import javax.sip.InvalidArgumentException;
import javax.sip.address.Address;

/**
 * Header factory extensions. These will be included in the next release of
 * JAIN-SIP.
 * 
 * @author mranga
 * 
 */
public interface HeaderFactoryExt {
	/**
	 * Create a ReferredBy Header.
	 * 
	 * @param address --
	 *            address for the header.
	 * 
	 */
	public ReferredByHeader createReferredByHeader(Address address);

	/**
	 * 
	 * Create a Replaces header with a call Id, to and from tag.
	 * 
	 * @param callId -
	 *            the call id to use.
	 * @param toTag -
	 *            the to tag to use.
	 * @param fromTag -
	 *            the fromTag to use.
	 * 
	 */
	public ReplacesHeader createReplacesHeader(String callId, String toTag,
			String fromTag) throws ParseException;

	/**
	 * creates a P-Access-Network-Info header.
	 * 
	 * @return newly created P-Access-Network-Info header
	 */
	public PAccessNetworkInfoHeader createPAccessNetworkInfoHeader();

	/**
	 * P-Asserted-Identity header
	 * 
	 * @param address -
	 *            Address
	 * @return newly created P-Asserted-Identity header
	 * @throws ParseException
	 * @throws NullPointerException
	 */
	public PAssertedIdentityHeader createPAssertedIdentityHeader(Address address)
			throws NullPointerException, ParseException;

	/**
	 * Creates a new P-Associated-URI header based on the supplied address
	 * 
	 * @param assocURI -
	 *            Address
	 * @return newly created P-Associated-URI header
	 * @throws NullPointerException
	 *             if the supplied address is null
	 * @throws ParseException
	 */
	public PAssociatedURIHeader createPAssociatedURIHeader(Address assocURI);

	/**
	 * P-Called-Party-ID header
	 * 
	 * @param address -
	 *            Address
	 * @return newly created P-Called-Party-ID header
	 * @throws NullPointerException
	 * @throws ParseException
	 */
	public PCalledPartyIDHeader createPCalledPartyIDHeader(Address address);

	/**
	 * P-Charging-Function-Addresses header
	 * 
	 * @return newly created P-Charging-Function-Addresses header
	 */
	public PChargingFunctionAddressesHeader createPChargingFunctionAddressesHeader();

	/**
	 * P-Charging-Vector header
	 * 
	 * @param icid -
	 *            icid string
	 * @return newly created P-Charging-Vector header
	 * @throws NullPointerException
	 * @throws ParseException
	 */
	public PChargingVectorHeader createChargingVectorHeader(String icid) throws ParseException;
	
	 /**
     * P-Media-Authorization header
     * @param token - token string
	 * @return newly created P-Media-Authorizarion header
     * @throws InvalidArgumentException
     * @throws ParseException
     */
    public PMediaAuthorizationHeader createPMediaAuthorizationHeader(String token)
    	throws InvalidArgumentException, ParseException;
    
    /**
     * P-Preferred-Identity header 
     * @param address - Address
	 * @return newly created P-Preferred-Identity header
     * @throws NullPointerException
     */
    public PPreferredIdentityHeader createPPreferredIdentityHeader(Address address);
    
    /**
     * P-Visited-Network-ID header
     * @return newly created P-Visited-Network-ID header
     */
    public PVisitedNetworkIDHeader createPVisitedNetworkIDHeader();
    
    /**
     * PATH header
     * @param address - Address
	 * @return newly created Path header
     * @throws NullPointerException
     * @throws ParseException
     */
    public PathHeader createPathHeader(Address address);
    
    /**
     * Privacy header
     * @param privacyType - privacy type string
	 * @return newly created Privacy header
     * @throws NullPointerException
     */
    public PrivacyHeader createPrivacyHeader(String privacyType);
    
    
    /**
     * Service-Route header
     * @param address - Address
	 * @return newly created Service-Route header
     * @throws NullPointerException
     */
    public ServiceRouteHeader createServiceRouteHeader(Address address);
    
    /**
     * Security-Server header
	 * @return newly created Security-Server header
     */
    public SecurityServerHeader createSecurityServerHeader();
    
    /**
     * Security-Client header
     * @return newly created Security-Client header
     */
    public SecurityClientHeader createSecurityClientHeader();
    
    
    /**
     * Security-Verify header
     * @return newly created Security-Verify header
     */
    public SecurityVerifyHeader createSecurityVerifyHeader();
    
    
    /**
	 * Creates a new SessionExpiresHeader based on the newly supplied expires value.
	 *
	 * @param expires - the new integer value of the expires.
	 * @throws InvalidArgumentException if supplied expires is less 
	 * than zero.
	 * @return the newly created SessionExpiresHeader object.
	 * 
	 */
	public SessionExpiresHeader createSessionExpiresHeader(int expires) throws InvalidArgumentException ;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy