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

org.jacpfx.api.coordinator.Coordinator Maven / Gradle / Ivy

/*
 * **********************************************************************
 *
 *  Copyright (C) 2010 - 2015
 *
 *  [Coordinator.java]
 *  JACPFX Project (https://github.com/JacpFX/JacpFX/)
 *  All rights reserved.
 *
 *  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.jacpfx.api.coordinator;

import org.jacpfx.api.component.ComponentBase;
import org.jacpfx.api.handler.ComponentHandler;
import org.jacpfx.api.message.Message;

import java.util.concurrent.TransferQueue;

/**
 * Defines a basic observer for component messages; handles the message and
 * delegate to responsible component.
 *
 * @param  defines the message listener type
 * @param  defines the basic event type
 * @param  defines the basic message type
 * @author Andy Moncsek
 */
public interface Coordinator {

    /**
     * Handles message to specific component addressed by the id.
     *
     * @param id,      the target id.
     * @param message, the message
     */
    void handleMessage(final String id, final Message message);

    /**
     * Returns the message queue of coordinator.
     *
     * @return the message queue
     */
    TransferQueue> getMessageQueue();


    /**
     * set associated componentHandler
     *
     * @param 

, is type of Component * @param handler, the component handler that handles component execution. */

> void setComponentHandler( final ComponentHandler> handler); /** * set associated perspectiveHandler * * @param

, is type of Component * @param handler, the perspective handler that handles perspective execution. */

> void setPerspectiveHandler( final ComponentHandler> handler); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy