diff --git a/pkts-core/src/main/java/io/pkts/framer/FramingException.java b/pkts-core/src/main/java/io/pkts/framer/FramingException.java index 6758deb8..d5d644f8 100644 --- a/pkts-core/src/main/java/io/pkts/framer/FramingException.java +++ b/pkts-core/src/main/java/io/pkts/framer/FramingException.java @@ -2,6 +2,14 @@ import io.pkts.protocol.Protocol; +/** +* A custom runtime exception specifically designed for handling protocol framing errors in the Pkts networking library. +* The FramingException captures both an error message and the associated Protocol, providing detailed context for network protocol framing issues. +* It extends RuntimeException and includes a constructor that takes a message and protocol, with a getter method +* to retrieve the specific protocol where the framing error occurred. This exception enhances error handling and +* debugging by allowing developers to precisely identify and diagnose protocol-level framing problems during network packet processing. +*/ + public class FramingException extends RuntimeException { private final Protocol protocol; diff --git a/pkts-sip/src/main/java/io/pkts/packet/sip/header/impl/ExpiresHeaderImpl.java b/pkts-sip/src/main/java/io/pkts/packet/sip/header/impl/ExpiresHeaderImpl.java index dee31033..f7f8f2ec 100644 --- a/pkts-sip/src/main/java/io/pkts/packet/sip/header/impl/ExpiresHeaderImpl.java +++ b/pkts-sip/src/main/java/io/pkts/packet/sip/header/impl/ExpiresHeaderImpl.java @@ -3,6 +3,14 @@ import io.pkts.buffer.Buffers; import io.pkts.packet.sip.header.ExpiresHeader; +/** +* ExpiresHeaderImpl is a specialized SIP header implementation for managing session expiration times in network communication. +* It extends SipHeaderImpl and implements the ExpiresHeader interface, providing a concrete mechanism to store and retrieve expiration values for SIP sessions. +* The class offers methods to create, access, and clone expiration headers, with a core focus on representing the integer-based expires time for SIP communication protocols. +* It supports basic header manipulation by storing an expires value and allowing retrieval and duplication of that value, +* facilitating session timeout and lifecycle management in SIP-based network interactions." + */ + public class ExpiresHeaderImpl extends SipHeaderImpl implements ExpiresHeader { private int expires;