com.gh.bmd.jrt.builder.ClassRoutineBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jroutine Show documentation
Show all versions of jroutine Show documentation
Parallel programming on the go
/*
* 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 com.gh.bmd.jrt.builder;
import com.gh.bmd.jrt.routine.Routine;
import java.lang.reflect.Method;
import javax.annotation.Nonnull;
/**
* Interface defining a builder of routines wrapping a class method.
*
* Note that only static methods can be asynchronously invoked through the routines created by this
* builder.
*
* Created by davide-maestroni on 3/7/15.
*
* @see com.gh.bmd.jrt.annotation.Alias Alias
* @see com.gh.bmd.jrt.annotation.Priority Priority
* @see com.gh.bmd.jrt.annotation.ShareGroup ShareGroup
* @see com.gh.bmd.jrt.annotation.Timeout Timeout
* @see com.gh.bmd.jrt.annotation.TimeoutAction TimeoutAction
*/
public interface ClassRoutineBuilder extends ConfigurableBuilder,
ProxyConfigurableBuilder {
/**
* Returns a routine used to call the method whose identifying name is specified in a
* {@link com.gh.bmd.jrt.annotation.Alias Alias} annotation.
* Optional {@link com.gh.bmd.jrt.annotation.Priority Priority},
* {@link com.gh.bmd.jrt.annotation.ShareGroup ShareGroup},
* {@link com.gh.bmd.jrt.annotation.Timeout Timeout} and
* {@link com.gh.bmd.jrt.annotation.TimeoutAction TimeoutAction} method annotations will be
* honored.
* Note that such annotations will override any configuration set through the builder.
*
* Note that it is up to the caller to ensure that the input data are passed to the routine in
* the correct order.
*
* @param name the name specified in the annotation.
* @param the input data type.
* @param