From c7a0b947e3a2bd9019dad5c093e98699baf2f6ea Mon Sep 17 00:00:00 2001 From: aloofgeoduckk Date: Thu, 22 May 2025 14:59:55 -0400 Subject: [PATCH 1/2] Add file-level documentation. --- .../io/pkts/packet/sip/header/impl/ExpiresHeaderImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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; From eeafdc1ae3df7d578933730813130d12687336fd Mon Sep 17 00:00:00 2001 From: aloofgeoduckk Date: Thu, 22 May 2025 15:01:39 -0400 Subject: [PATCH 2/2] File-level documentation. --- .../src/main/java/io/pkts/framer/FramingException.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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;