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

com.evento.application.proxy.InvokerWrapper Maven / Gradle / Ivy

Go to download

Evento Framework - Bundle. The library to build a RECQ System based on Evento Server

The newest version!
package com.evento.application.proxy;

import com.evento.common.messaging.gateway.CommandGateway;
import com.evento.common.messaging.gateway.QueryGateway;

/**
 * The InvokerWrapper class is an abstract class that serves as a wrapper for the command and query gateways.
 * It provides methods to retrieve the command and query gateways.
 */
public abstract class InvokerWrapper {

	/**
	 * Retrieves the command gateway.
	 *
	 * @return the command gateway
	 * @throws RuntimeException if the command gateway is unavailable.
	 */
	protected CommandGateway getCommandGateway() {
		throw new RuntimeException("getCommandGateway() called outside an @InvocationHandler scope.");
	}

	/**
	 * Retrieves the query gateway.
	 *
	 * @return the query gateway
	 * @throws RuntimeException if the query gateway is unavailable.
	 */
	protected QueryGateway getQueryGateway() {
		throw new RuntimeException("getQueryGateway() called outside an @InvocationHandler scope.");
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy