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

io.pkts.packet.SipMessageFactory Maven / Gradle / Ivy

There is a newer version: 3.0.10
Show newest version
/**
 * 
 */
package io.pkts.packet;

import io.pkts.packet.sip.SipParseException;
import io.pkts.packet.sip.SipRequest;
import io.pkts.packet.sip.SipResponse;
import io.pkts.packet.sip.header.CSeqHeader;
import io.pkts.packet.sip.header.CallIdHeader;
import io.pkts.packet.sip.header.FromHeader;
import io.pkts.packet.sip.header.MaxForwardsHeader;
import io.pkts.packet.sip.header.ToHeader;

/**
 * @author [email protected]
 */
public interface SipMessageFactory {

    /**
     * Create a new response based on the supplied {@link SipRequest}. Only the
     * mandatory headers from the {@link SipRequest} are copied. Those mandatory
     * headers are:
     * 
    *
  • {@link ToHeader}
  • *
  • {@link FromHeader}
  • *
  • {@link CallIdHeader}.
  • *
  • {@link CSeqHeader}
  • *
  • {@link MaxForwardsHeader}
  • *
* * @param statusCode * @param request * @return * @throws SipParseException * in case anything goes wrong when parsing out headers from the * {@link SipRequest} */ SipResponse createResponse(int statusCode, SipRequest request) throws SipParseException; /** * Creates a new {@link SipRequest} using the original request as a * template. * * @param originalRequest * @return * @throws SipParseException */ SipRequest createRequest(SipRequest originalRequest) throws SipParseException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy