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

org.jboss.as.protocol.mgmt.ManagementChannelAssociation Maven / Gradle / Ivy

There is a newer version: 8.2.1.Final
Show newest version
/*
 * JBoss, Home of Professional Open Source.
 * Copyright 2012, Red Hat, Inc., and individual contributors
 * as indicated by the @author tags. See the copyright.txt file in the
 * distribution for a full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

package org.jboss.as.protocol.mgmt;

import org.jboss.remoting3.Channel;
import org.jboss.threads.AsyncFuture;

import java.io.IOException;

/**
 * Associates a remoting {@code Channel} to a management client.
 *
 * @author Emanuel Muckenhuber
 */
public interface ManagementChannelAssociation {

    /**
     * Execute a management request.
     *
     * @param request the request
     * @param attachment the attachment
     * @param  the result type
     * @param  the attachment type
     * @return the created active operation
     * @throws IOException
     */
     ActiveOperation executeRequest(final ManagementRequest request, A attachment) throws IOException;

    /**
     * Execute a management request.
     *
     * @param request the request
     * @param attachment the attachment
     * @param callback the completion listener
     * @param  the result type
     * @param  the attachment type
     * @return the created active operation
     * @throws IOException
     */
     ActiveOperation executeRequest(final ManagementRequest request, A attachment, ActiveOperation.CompletedCallback callback) throws IOException;

    /**
     * Execute a request based on an existing active operation.
     *
     * @param operationId the operation-id of the existing active operation
     * @param request the request
     * @param  the request type
     * @param  the attachment type
     * @return the future result
     * @throws IOException
     */
     AsyncFuture executeRequest(final Integer operationId, final ManagementRequest request) throws IOException;

    /**
     * Execute a request based on an existing active operation.
     *
     * @param operation the active operation
     * @param request the request
     * @param  the result type
     * @param  the attachment type
     * @return the future result
     * @throws IOException
     */
     AsyncFuture executeRequest(final ActiveOperation operation, final ManagementRequest request) throws IOException;

     ActiveOperation initializeOperation(A attachment, ActiveOperation.CompletedCallback callback) throws IOException;

    /**
     * Get the underlying remoting channel associated with this context.
     *
     * @return the channel
     * @throws IOException
     */
    Channel getChannel() throws IOException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy