<commit_before>package com.github.thorbenkuck.netcom2.interfaces;

import com.github.thorbenkuck.netcom2.annotations.Experimental;
import com.github.thorbenkuck.netcom2.network.client.InvocationHandlerProducer;

public interface RemoteObjectAccess {

	@Experimental
	<T> T getRemoteObject(Class<T> clazz);

	@Experimental
	void updateRemoteInvocationProducer(InvocationHandlerProducer invocationHandlerProducer);

}<commit_msg>documentation<commit_after>package com.github.thorbenkuck.netcom2.interfaces;

import com.github.thorbenkuck.netcom2.annotations.Experimental;
import com.github.thorbenkuck.netcom2.network.client.InvocationHandlerProducer;

/**
 * This interface provides an way of getting RemoteObjects.
 *
 * The {@link com.github.thorbenkuck.netcom2.network.interfaces.ClientStart} for example implements this method. So you
 * may get any RemoteObject by stating
 *
 * <code>
 *     class Example {
 *         private ClientStart clientStart;
 *
 *         ...
 *
 *         public void run() {
 *             TestObject testObject = clientStart.getRemoteObject(TestObject.class);
 *         }
 *     }
 * </code>
 *
 * It returns an actual, callable instance of the provided Class. However, the Method-call will be delegated to the Server.
 * The Server then calculates results based upon the real Object, registered at the {@link RemoteObjectRegistration} and
 * then return this Result back to the Client.
 *
 * Further any Throwable encountered while running the real Object will be pinged back to the executing client.
 *
 * @see com.github.thorbenkuck.netcom2.annotations.remoteObjects.IgnoreRemoteExceptions
 * @see com.github.thorbenkuck.netcom2.annotations.remoteObjects.SingletonRemoteObject
 * @see com.github.thorbenkuck.netcom2.network.client.RemoteObjectHandler
 */
public interface RemoteObjectAccess {

	/**
	 * The call of this Method will result in an callable instance of the provided <code>class</code>.
	 *
	 * This instance will be delegating the quarry back to the Server and return any result and throw any Throwable back
	 * from the Server.
	 *
	 * @param clazz the Class of the Object that should be created
	 * @param <T> the Type, identified by the provided class
	 * @return an callable instance of the type <code>T</code>
	 */
	@Experimental
	<T> T getRemoteObject(Class<T> clazz);

	/**
	 * This Method changes the {@link InvocationHandlerProducer} set internally.
	 *
	 * The {@link InvocationHandlerProducer} creates a new Instance if {@link #getRemoteObject(Class)} is called.
	 * By changing this {@link InvocationHandlerProducer}, you can provide a custom {@link com.github.thorbenkuck.netcom2.network.client.RemoteObjectHandler}
	 * to be used internally
	 *
	 * @see InvocationHandlerProducer
	 * @param invocationHandlerProducer the {@link InvocationHandlerProducer} that should create the {@link com.github.thorbenkuck.netcom2.network.client.RemoteObjectHandler}
	 */
	@Experimental
	void updateRemoteInvocationProducer(InvocationHandlerProducer invocationHandlerProducer);

}
{'fraction_non_alphanumeric': 0.08248102936324646, 'fraction_numerical': 0.00395908940943583, 'mean_word_length': 4.646182495344506, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4640362', 'n_tokens_mistral': 867, 'n_tokens_neox': 817, 'n_words': 254}