/** * Creates a new correlation context from DTLS session parameters. * * @param sessionId the session's ID. * @param epoch the session's current read/write epoch. * @param cipher the cipher suite of the session's current read/write state. * @throws NullPointerException if any of the params is <code>null</code>. */ public DtlsCorrelationContext(String sessionId, String epoch, String cipher) { if (sessionId == null) { throw new NullPointerException("Session ID must not be null"); } else if (epoch == null) { throw new NullPointerException("Epoch must not be null"); } else if (cipher == null) { throw new NullPointerException("Cipher must not be null"); } else { put(KEY_SESSION_ID, sessionId); put(KEY_EPOCH, epoch); put(KEY_CIPHER, cipher); } }