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

org.jboss.ejb.server.Association Maven / Gradle / Ivy

Go to download

This artifact provides a single jar that contains all classes required to use remote EJB and JMS, including all dependencies. It is intended for use by those not using maven, maven users should just import the EJB and JMS BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up with different versions on classes on the class path).

There is a newer version: 34.0.0.Final
Show newest version
/*
 * JBoss, Home of Professional Open Source.
 * Copyright 2017 Red Hat, Inc., and individual contributors
 * as indicated by the @author tags.
 *
 * Licensed 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
 *
 *     http://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 org.jboss.ejb.server;

import org.wildfly.common.annotation.NotNull;

/**
 * A server association.  Since server associations yield {@link ClassLoader} instances, it is important that classes
 * implementing this interface are not accessible without a permission check when a security manager is present.  This
 * class is implemented by Enterprise Beans server environments and consumed by protocol implementations.
 *
 * @author David M. Lloyd
 */
public interface Association {

    /**
     * Receive and execute an invocation request.  An invocation may be cancelled; the returned handle may be used
     * by the protocol implementation when a cancellation request is received by the server.
     *
     * @param invocationRequest the invocation request (not {@code null})
     * @param  the type of the target Enterprise Beans
     * @return a handle which may be used to request cancellation of the invocation (must not be {@code null})
     */
    @NotNull
     CancelHandle receiveInvocationRequest(@NotNull InvocationRequest invocationRequest);

    /**
     * Receive and execute a session open request.  An invocation may be cancelled; the returned handle may be used
     * by the protocol implementation when a cancellation request is received by the server.
     *
     * @param sessionOpenRequest the session open request (not {@code null})
     * @return a handle which may be used to request cancellation of the invocation (must not be {@code null})
     */
    @NotNull
    CancelHandle receiveSessionOpenRequest(@NotNull SessionOpenRequest sessionOpenRequest);

    /**
     * Register a cluster topology listener.  This is used by legacy protocols to transmit cluster updates to old clients.
     *
     * @param clusterTopologyListener the cluster topology listener (not {@code null})
     * @return a handle which may be used to cancel the topology listener registration (must not be {@code null})
     */
    @NotNull
    ListenerHandle registerClusterTopologyListener(@NotNull ClusterTopologyListener clusterTopologyListener);

    /**
     * Register a module availability listener.  This is used by legacy clients which use no-affinity Enterprise Bean locators.
     *
     * @param moduleAvailabilityListener the module availability listener (not {@code null})
     * @return a handle which may be used to cancel the availability listener registration (must not be {@code null})
     */
    @NotNull
    ListenerHandle registerModuleAvailabilityListener(@NotNull ModuleAvailabilityListener moduleAvailabilityListener);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy