Class MethodDescriptor

java.lang.Object
COM.TIBCO.hawk.talon.MethodDescriptor
All Implemented Interfaces:
Serializable

public class MethodDescriptor extends Object implements Serializable
MethodDescriptor objects are used to describe the methods of microagents.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    This impact value indicates that the method takes some action that can potentially change the state of the managed object.
    static final int
    This impact value indicates that the method takes some action that can potentially change the state of the managed object and also returns some information as a return value.
    static final int
    This impact value indicates that the method simply retrieves some information in a manner that does not change the state of the managed object.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MethodDescriptor(String name, String desc, DataDescriptor ret, DataDescriptor[] args, boolean async, int impact, int maxTime)
    Constructs a method descriptor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares this object against the specified object.
    Returns a DataDescriptor array describing the method's arguments or null if this method accepts no arguments.
    Returns a description of this method
    int
    Returns the impact of this method.
    int
    Returns the maximum response time for this method.
    Returns the name of this method
    Returns the DataDescriptor describing the method's return value or null if the method returns no value.
    boolean
    Returns true if the method is asynchronous.
    boolean
    Returns true if this descriptor describes an open method.
    Returns a formatted string representation of this descriptor.
    Returns a string representation of this descriptor.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • IMPACT_INFO

      public static final int IMPACT_INFO
      This impact value indicates that the method simply retrieves some information in a manner that does not change the state of the managed object.
      See Also:
    • IMPACT_ACTION

      public static final int IMPACT_ACTION
      This impact value indicates that the method takes some action that can potentially change the state of the managed object.
      See Also:
    • IMPACT_ACTION_INFO

      public static final int IMPACT_ACTION_INFO
      This impact value indicates that the method takes some action that can potentially change the state of the managed object and also returns some information as a return value.
      See Also:
  • Constructor Details

    • MethodDescriptor

      public MethodDescriptor(String name, String desc, DataDescriptor ret, DataDescriptor[] args, boolean async, int impact, int maxTime)
      Constructs a method descriptor.
      Parameters:
      name - The name of the method. Must be a non-null, non-empty string.
      desc - A description of the method
      ret - A DataDescriptor describing the return value of the method. It may be null to indicate that this method has no return value.
      args - An array of DataDescriptor objects describing the arguments required by the method. It may be null or empty array to indicat that this method has no arguments. If not empty, the array must not contain null elements. Each DataDescriptor in this array must have a unique name.
      async - Indicates whether or not this method is an asynchronous method. An asynchronous method is analogous to an event source. Listeners that subscribe to an asynchronous method will receive the method's declared return value each time an particular event occurs. A method may not be declared as asynchronous unless it also describes a return value (see ret parameter).
      impact - States the impact this method will have. Must be one of IMPACT_ACTION, IMPACT_INFO, or IMPACT_ACTION_INFO. A method that does not return a value (see ret parameter) may not be declared to have an impact of IMPACT_INFO or IMPACT_ACTION_INFO.
      maxTime - The maximum response time for this method, in seconds. Must be greater than zero. This is the amount of time that must elapse between the method's invocation and its return before declaring it to have timed out. If the method is being invoked remotely, the round-trip time of the intervening transport mechanism should also be taken into account before declaring a timeout.
      Throws:
      IllegalArgumentException - If the parameter conditions are violated.
  • Method Details

    • getName

      public String getName()
      Returns the name of this method
      Returns:
      The name of this method
    • getDescription

      public String getDescription()
      Returns a description of this method
      Returns:
      A description of this method
    • getReturnDescriptor

      public DataDescriptor getReturnDescriptor()
      Returns the DataDescriptor describing the method's return value or null if the method returns no value.
      Returns:
      The DataDescriptor describing the method's return value or null if the method returns no value.
    • getArgumentDescriptors

      public DataDescriptor[] getArgumentDescriptors()
      Returns a DataDescriptor array describing the method's arguments or null if this method accepts no arguments.
      Returns:
      A DataDescriptor array describing the method's arguments or null if this method accepts no arguments.
    • isAsync

      public boolean isAsync()
      Returns true if the method is asynchronous.

      An asynchronous method is analogous to an event source. Listeners that subscribe to an asynchronous method will receive the method's declared return value each time a particular event occurs.

      Returns:
      True if the method is asynchronous
    • getImpact

      public int getImpact()
      Returns the impact of this method.
      Returns:
      the impact of this method.
      See Also:
    • getMaxResponseTime

      public int getMaxResponseTime()
      Returns the maximum response time for this method. This is the amount of time, in seconds, that must elapse between the method's invocation and its return before declaring it to have timed out. If the method is being invoked remotely, the round-trip time of the intervening transport mechanism should also be taken into account before declaring a timeout.
      Returns:
      the maximum response time for this method.
    • isOpenMethod

      public boolean isOpenMethod()
      Returns true if this descriptor describes an open method.

      An open method is one whose argument and return types are limited to the set of open data types defined by the OpenData interface.

      Because an open method uses a well known set of types, it can be used in an open manner by any application using this api.

      A non-open method is a proprietary method from the perspective of the TIB/Hawk Console API because it uses data types outside of this set.

      Use of non-open methods is supported by this api. However, this api by itself is not sufficient to use such methods. An additonal proprietary api is required.

      Returns:
      True if this descriptor describes an open method.
      See Also:
    • equals

      public boolean equals(Object obj)
      Compares this object against the specified object.

      Two MethodDescriptor objects are equal if they have the same name, description, return descriptors, argument descriptors (specified in the same order), and the same async and impact values.

      Overrides:
      equals in class Object
      Returns:
      true if the two objects are equal.
    • toString

      public String toString()
      Returns a string representation of this descriptor.
      Overrides:
      toString in class Object
    • toFormattedString

      public String toFormattedString(String indent)
      Returns a formatted string representation of this descriptor.