Home / File/ AbstractOcspTest.java — netty Source File

AbstractOcspTest.java — netty Source File

Architecture documentation for AbstractOcspTest.java, a java file in the netty codebase.

Entity Profile

Relationship Graph

Source Code

/*
 * Copyright 2025 The Netty Project
 *
 * The Netty Project licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package io.netty.handler.ssl.ocsp;

import io.netty.channel.EventLoopGroup;
import io.netty.channel.MultiThreadIoEventLoopGroup;
import io.netty.channel.nio.NioIoHandler;
import io.netty.channel.socket.nio.NioDatagramChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;

/**
 * We can't use {@link IoTransport#DEFAULT} because that breaks leak detection. This base class creates a per-test
 * transport as a substitute.
 */
abstract class AbstractOcspTest {
    private EventLoopGroup group;

    @BeforeEach
    void start() {
        group = new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory());
    }

    @AfterEach
    void stop() {
        group.shutdownGracefully().syncUninterruptibly();
    }

    IoTransport createDefaultTransport() {
        return IoTransport.create(group.next(), NioSocketChannel::new, NioDatagramChannel::new);
    }
}

Domain

Subdomains

Frequently Asked Questions

What does AbstractOcspTest.java do?
AbstractOcspTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is AbstractOcspTest.java in the architecture?
AbstractOcspTest.java is located at handler-ssl-ocsp/src/test/java/io/netty/handler/ssl/ocsp/AbstractOcspTest.java (domain: Buffer, subdomain: Allocators, directory: handler-ssl-ocsp/src/test/java/io/netty/handler/ssl/ocsp).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free