Class ServiceCall

java.lang.Object
jadex.providedservice.impl.service.ServiceCall
Direct Known Subclasses:
CallAccess

public class ServiceCall extends Object
Information about a current service call. Similar to a ThreadLocal in Java but for service calls, i.e. between different threads and hosts available.
  • Field Details

  • Constructor Details

    • ServiceCall

      protected ServiceCall(jadex.core.ComponentIdentifier caller, Map<String,Object> props)
      Create a service call info object.
  • Method Details

    • createServiceCall

      protected static ServiceCall createServiceCall(jadex.core.ComponentIdentifier caller, Map<String,Object> props)
      Create a service call.
    • getNextInvocation

      public static ServiceCall getNextInvocation()
      Get the invocation data for the next service call.
    • getCurrentInvocation

      public static ServiceCall getCurrentInvocation()
      Get the service call instance corresponding to the current execution context.
      Returns:
      The service call instance or null.
    • getLastInvocation

      public static ServiceCall getLastInvocation()
      Get the last service call instance corresponding to the current execution context.
      Returns:
      The service call instance or null.
    • getOrCreateNextInvocation

      public static ServiceCall getOrCreateNextInvocation()
      Set the properties of the next invocation.
      Parameters:
      timeout - The timeout.
      realtime - The realtime flag.
    • getOrCreateNextInvocation

      public static ServiceCall getOrCreateNextInvocation(Map<String,Object> props)
      Get or create the next servicecall for the next invocation.
      Parameters:
      timeout - The timeout.
      realtime - The realtime flag.
    • getCaller

      public jadex.core.ComponentIdentifier getCaller()
      Get the caller component.
      Returns:
      The caller component.
    • getProperty

      public Object getProperty(String name)
      Get a property.
      Parameters:
      name - The property name.
      Returns:
      The property.
    • setProperty

      public void setProperty(String name, Object val)
      Set a property.
      Parameters:
      name - The property name.
      val - The property value.
    • getPropertiesClone

      public Map<String,Object> getPropertiesClone()
      Get a shallow clone from all props.
      Returns:
      The properties clone.
    • toString

      public String toString()
      Get the string represntation.
      Overrides:
      toString in class Object