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/Session.java
/* * Copyright (c) 2015, 2020, 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; import java.net.SocketAddress; import java.util.concurrent.CompletableFuture; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collector; import com.mysql.cj.conf.HostInfo; import com.mysql.cj.conf.PropertySet; import com.mysql.cj.exceptions.CJOperationNotSupportedException; import com.mysql.cj.exceptions.ExceptionFactory; import com.mysql.cj.exceptions.ExceptionInterceptor; import com.mysql.cj.log.Log; import com.mysql.cj.log.ProfilerEventHandler; import com.mysql.cj.protocol.Message; import com.mysql.cj.protocol.Protocol; import com.mysql.cj.protocol.ResultBuilder; import com.mysql.cj.protocol.ServerSession; import com.mysql.cj.result.Row; /** * {@link Session} exposes logical level which user API uses internally to call {@link Protocol} methods. * It's a higher-level abstraction than MySQL server session ({@link ServerSession}). {@link Protocol} and {@link ServerSession} methods * should never be used directly from user API. * */ public interface Session { PropertySet getPropertySet(); <M extends Message> MessageBuilder<M> getMessageBuilder(); /** * Re-authenticates as the given user and password * * @param userName * DB user name * @param password * DB user password * @param database * database name * */ void changeUser(String userName, String password, String database); ExceptionInterceptor getExceptionInterceptor(); void setExceptionInterceptor(ExceptionInterceptor exceptionInterceptor); /** * Log-off of the MySQL server and close the socket. * */ void quit(); /** * Clobbers the physical network connection and marks this session as closed. */ void forceClose(); /** * Does the version of the MySQL server we are connected to meet the given * minimums? * * @param major * major version number * @param minor * minor version number * @param subminor * sub-minor version number * @return true if current server version equal or higher than provided one */ boolean versionMeetsMinimum(int major, int minor, int subminor); long getThreadId(); boolean isSetNeededForAutoCommitMode(boolean autoCommitFlag); /** * Returns the log mechanism that should be used to log information from/for this Session. * * @return the Log instance to use for logging messages. */ Log getLog(); /** * Returns the current ProfilerEventHandler or initializes a new one if none exists. * * @return the {@link ProfilerEventHandler} object. */ ProfilerEventHandler getProfilerEventHandler(); HostInfo getHostInfo(); String getQueryTimingUnits(); ServerSession getServerSession(); boolean isSSLEstablished(); SocketAddress getRemoteSocketAddress(); String getProcessHost(); /** * Add listener for this session status changes. * * @param l * {@link SessionEventListener} instance. */ void addListener(SessionEventListener l); /** * Remove session listener. * * @param l * {@link SessionEventListener} instance. */ void removeListener(SessionEventListener l); public static interface SessionEventListener { void handleNormalClose(); void handleReconnect(); void handleCleanup(Throwable whyCleanedUp); } boolean isClosed(); String getIdentifierQuoteString(); DataStoreMetadata getDataStoreMetadata(); /** * Synchronously query database with applying rows filtering and mapping. * * @param message * query message * @param rowFilter * row filter function * @param rowMapper * row map function * @param collector * result collector * @param <M> * Message type * @param <R> * Row type * @param <RES> * Result type * @return List of rows */ default <M extends Message, R, RES> RES query(M message, Predicate<Row> rowFilter, Function<Row, R> rowMapper, Collector<R, ?, RES> collector) { throw ExceptionFactory.createException(CJOperationNotSupportedException.class, "Not supported"); } /** * Synchronously query database. * * @param message * query message * @param resultBuilder * ResultBuilder instance * @param <M> * Message type * @param <R> * Result type * @return {@link QueryResult} object */ default <M extends Message, R extends QueryResult> R query(M message, ResultBuilder<R> resultBuilder) { throw ExceptionFactory.createException(CJOperationNotSupportedException.class, "Not supported"); } /** * Asynchronously query database. * * @param message * query message * @param resultBuilder * ResultBuilder instance * @param <M> * Message type * @param <R> * Result type * @return CompletableFuture providing a {@link QueryResult} object */ default <M extends Message, R extends QueryResult> CompletableFuture<R> queryAsync(M message, ResultBuilder<R> resultBuilder) { throw ExceptionFactory.createException(CJOperationNotSupportedException.class, "Not supported"); } }
⏎ com/mysql/cj/Session.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, 6186👍, 0💬
Popular Posts:
What Is mail.jar of JavaMail 1.3? I got the JAR file from javamail-1_3.zip. mail.jar in javamail-1_3...
What Is jaxb-impl-2.1.12.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Jav...
JDK 17 jdk.compiler.jmod is the JMOD file for JDK 17 Compiler tool, which can be invoked by the "jav...
JAX-WS is an API for building web services and clients. It is the next generation Web Services API r...
Where to find answers to frequently asked questions on Download and Installing of Older Versions? He...