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

io.sarl.api.probing.ProbeService Maven / Gradle / Ivy

The newest version!
/**
 * $Id$
 * 
 * SARL is an general-purpose agent programming language.
 * More details on http://www.sarl.io
 * 
 * Copyright (C) 2014-2023 SARL.io, the Original Authors and Main Authors
 * 
 * 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 io.sarl.api.probing;

import io.sarl.api.naming.name.SarlName;
import io.sarl.lang.core.annotation.DefaultValue;
import io.sarl.lang.core.annotation.DefaultValueSource;
import io.sarl.lang.core.annotation.DefaultValueUse;
import io.sarl.lang.core.annotation.SarlElementType;
import io.sarl.lang.core.annotation.SarlSourceCode;
import io.sarl.lang.core.annotation.SarlSpecification;
import io.sarl.lang.core.annotation.SyntheticMember;
import java.net.URI;
import java.util.Collection;
import org.arakhne.afc.services.IService;
import org.eclipse.xtext.xbase.lib.Pure;

/**
 * This service provides probing mechanisms.
 * 
 * @author Stéphane Galland
 * @version api.probing 0.13.0 20230919-093058
 * @mavengroupid io.sarl.sdk
 * @mavenartifactid api.probing
 * @since 0.12
 */
@SarlSpecification("0.13")
@SarlElementType(11)
@SuppressWarnings("all")
public interface ProbeService extends IService {
  /**
   * Create a probe.
   * 
   * 

If a probe with the same name name exists, a composed probe with the probe name is created with * the probes as composite. * * @param valueName the probed element. * @param valueType the expected type of the value. * @param probeName is the optional name of the probe. */ @DefaultValueSource Probe probe(final SarlName valueName, final Class valueType, @DefaultValue("io.sarl.api.probing.ProbeService#PROBE_0") final String probeName); /** * Create a probe. * *

If a probe with the same name name exists, a composed probe with the probe name is created with * the probes as composite. * * @param valueName the probed element. * @param valueType the expected type of the value. * @param probeName is the optional name of the probe. */ @DefaultValueSource Probe probe(final URI valueName, final Class valueType, @DefaultValue("io.sarl.api.probing.ProbeService#PROBE_1") final String probeName); /** * Create a probe. * *

If a probe with the same name name exists, a composed probe with the probe name is created with * the probes as composite. * * @param valueName the probed element. * @param valueType the expected type of the value. * @param probeName is the optional name of the probe. */ @DefaultValueSource Probe probe(final String valueName, final Class valueType, @DefaultValue("io.sarl.api.probing.ProbeService#PROBE_2") final String probeName); /** * Replies all the probes. * * @return the iterable on probes */ @Pure Collection> getProbes(); /** * Release all the probes. */ void releaseAllProbes(); /** * Force the synchronization of the probes. */ void sync(); /** * Default value for the parameter probeName */ @Pure @SyntheticMember @SarlSourceCode("null") default String $DEFAULT_VALUE$PROBE_0() { return null; } /** * Default value for the parameter probeName */ @Pure @SyntheticMember @SarlSourceCode("null") default String $DEFAULT_VALUE$PROBE_1() { return null; } /** * Default value for the parameter probeName */ @Pure @SyntheticMember @SarlSourceCode("null") default String $DEFAULT_VALUE$PROBE_2() { return null; } /** * Create a probe. * *

If a probe with the same name name exists, a composed probe with the probe name is created with * the probes as composite. * * @param valueName the probed element. * @param valueType the expected type of the value. * @optionalparam probeName is the optional name of the probe. */ @DefaultValueUse("io.sarl.api.naming.name.SarlName,java.lang.Class,java.lang.String") @SyntheticMember default Probe probe(final SarlName valueName, final Class valueType) { return (io.sarl.api.probing.Probe)probe(valueName, valueType, $DEFAULT_VALUE$PROBE_0()); } /** * Create a probe. * *

If a probe with the same name name exists, a composed probe with the probe name is created with * the probes as composite. * * @param valueName the probed element. * @param valueType the expected type of the value. * @optionalparam probeName is the optional name of the probe. */ @DefaultValueUse("java.net.URI,java.lang.Class,java.lang.String") @SyntheticMember default Probe probe(final URI valueName, final Class valueType) { return (io.sarl.api.probing.Probe)probe(valueName, valueType, $DEFAULT_VALUE$PROBE_1()); } /** * Create a probe. * *

If a probe with the same name name exists, a composed probe with the probe name is created with * the probes as composite. * * @param valueName the probed element. * @param valueType the expected type of the value. * @optionalparam probeName is the optional name of the probe. */ @DefaultValueUse("java.lang.String,java.lang.Class,java.lang.String") @SyntheticMember default Probe probe(final String valueName, final Class valueType) { return (io.sarl.api.probing.Probe)probe(valueName, valueType, $DEFAULT_VALUE$PROBE_2()); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy