All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hotswap.agent.plugin.owb.beans.OwbHotswapContext Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
/*
 * Copyright 2013-2024 the HotswapAgent authors.
 *
 * This file is part of HotswapAgent.
 *
 * HotswapAgent is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 2 of the License, or (at your
 * option) any later version.
 *
 * HotswapAgent 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 for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with HotswapAgent. If not, see http://www.gnu.org/licenses/.
 */
package org.hotswap.agent.plugin.owb.beans;

import java.util.Set;

import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.context.spi.Contextual;


/**
 * The Interface OwbHotswapContext.
 *
 * @author [email protected]
 */
public interface OwbHotswapContext {

    /**
     * 

* Destroy the existing contextual instance. If there is no existing * instance, no action is taken. *

* * @definedIn AlterableContext * @param contextual the contextual type * @throws ContextNotActiveException if the context is not active */ void destroy(Contextual contextual); /** * Determines if the context object is active. * * If the context is active, then $$ha$redefine() is called. * * @definedIn Context * @return true if the context is active, or false * otherwise. */ boolean isActive(); /** * Return an existing instance of a certain contextual type or a null value. * * @param the type of the contextual type * @param contextual the contextual type * @return the contextual instance, or a null value * * @throws ContextNotActiveException if the context is not active */ public T get(Contextual contextual); /** * Adds a bean to the set of beans to be reloaded. * * @param bean */ void $$ha$addBeanToReloadOwb(Contextual bean); /** * Gets the OWB beans to be reloaded. * * @return the OWB beans to be reloaded */ Set> $$ha$getBeansToReloadOwb(); /** * reload the owb beans which have changed */ void $$ha$reloadOwb(); /** * the original isActive() method (renamed) * * @return */ boolean $$ha$isActiveOwb(); }