Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Source Code for Connector/J 8.0.31 - Core API
Where to get the Java source code for Connector/J 8.0 Core API module?
✍: FYIcenter.com
Java source code files for Connector/J 8.0 Core API module are:
⏎ com/mysql/cj/protocol/MessageReader.java
/* * Copyright (c) 2018, 2021, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, version 2.0, as published by the * Free Software Foundation. * * This program is also distributed with certain software (including but not * limited to OpenSSL) that is licensed under separate terms, as designated in a * particular file or component or in included license documentation. The * authors of MySQL hereby grant you an additional permission to link the * program and your derivative works with the separately licensed software that * they have included with MySQL. * * Without limiting anything contained in the foregoing, this file, which is * part of MySQL Connector/J, is also subject to the Universal FOSS Exception, * version 1.0, a copy of which can be found at * http://oss.oracle.com/licenses/universal-foss-exception. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, * for more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ package com.mysql.cj.protocol; import java.io.IOException; import java.util.Optional; import com.mysql.cj.exceptions.CJOperationNotSupportedException; import com.mysql.cj.exceptions.ExceptionFactory; public interface MessageReader<H extends MessageHeader, M extends Message> { /** * Read the next message header from server, possibly blocking indefinitely until the message is received. * * @return {@link MessageHeader} of the next message * @throws IOException * if an error occurs */ H readHeader() throws IOException; /** * Read the next message header from server, possibly blocking indefinitely until the message is received, * and cache it so that the next {@link #readHeader()} return the same header. * * @return {@link MessageHeader} of the next message * @throws IOException * if an error occurs */ default H probeHeader() throws IOException { return readHeader(); } /** * Read message from server into to the given {@link Message} instance or into the new one if not present. * For asynchronous channel it synchronously reads the next message in the stream, blocking until the message is read fully. * Could throw CJCommunicationsException wrapping an {@link IOException} during read or parse * * @param reuse * {@link Message} object to reuse. May be ignored by implementation. * @param header * {@link MessageHeader} instance * @return {@link Message} instance * @throws IOException * if an error occurs */ M readMessage(Optional<M> reuse, H header) throws IOException; /** * Read message from server into to the given {@link Message} instance or into the new one if not present * and cache it so that the next {@link #readMessage(Optional, MessageHeader)} return the same message. * For asynchronous channel it synchronously reads the next message in the stream, blocking until the message is read fully. * Could throw CJCommunicationsException wrapping an {@link IOException} during read or parse * * @param reuse * {@link Message} object to reuse. May be ignored by implementation. * @param header * {@link MessageHeader} instance * @return {@link Message} instance * @throws IOException * if an error occurs */ default M probeMessage(Optional<M> reuse, H header) throws IOException { return readMessage(reuse, header); } /** * Read message from server into to the given {@link Message} instance or into the new one if not present. * For asynchronous channel it synchronously reads the next message in the stream, blocking until the message is read fully. * Could throw WrongArgumentException if the expected message type is not the next message (exception will be thrown in *caller* context). * * @param reuse * {@link Message} object to reuse. May be ignored by implementation. * @param expectedType * Expected type of message. * @return {@link Message} instance * @throws IOException * if an error occurs */ default M readMessage(Optional<M> reuse, int expectedType) throws IOException { throw ExceptionFactory.createException(CJOperationNotSupportedException.class, "Not supported"); } /** * Queue a {@link MessageListener} to receive messages delivered asynchronously. * * @param l * {@link MessageListener} */ default void pushMessageListener(MessageListener<M> l) { throw ExceptionFactory.createException(CJOperationNotSupportedException.class, "Not supported"); } /** * Get last message sequence number, as it was stored by {@link #readHeader()}. * * @return number */ default byte getMessageSequence() { return 0; } /** * Set stored message sequence number to 0. */ default void resetMessageSequence() { // no-op } /** * Return a MessageReader instance free of decorators. * * @return {@link MessageReader} */ default MessageReader<H, M> undecorateAll() { return this; } /** * Return the previous MessageReader instance from the decorators chain or the current MessageReader * if it is the first entry in a chain. * * @return {@link MessageReader} */ default MessageReader<H, M> undecorate() { return this; } /** * Start reading messages reader from the provided channel. */ default void start() { // no-op } /** * Signal to the reader that it should stop reading messages after reading the next message. */ default void stopAfterNextMessage() { // no-op } }
⏎ com/mysql/cj/protocol/MessageReader.java
Or download all of them as a single archive file:
File name: mysql-connector-java-core-api-8.0.31.zip File size: 309381 bytes Release date: 2022-09-03 Download
⇒ Source Code for Connector/J 8.0.31 - Core Impl
⇐ What Is mysql-connector-j-8.0.31.jar?
2023-05-31, 6253👍, 0💬
Popular Posts:
JAX-WS is an API for building web services and clients. It is the next generation Web Services API r...
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
Jetty provides an HTTP server, HTTP client, and javax.servlet container. These components are open s...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....
Where to find answers to frequently asked questions on Download and Installing of Older Versions? He...