org.apache.qpid.management.domain.model
Class QpidMethod

java.lang.Object
  extended by org.apache.qpid.management.domain.model.QpidFeature
      extended by org.apache.qpid.management.domain.model.QpidMethod

public class QpidMethod
extends QpidFeature

Qpid method definition. An entity describing an invocation that can be made on a managed object instance.


Field Summary
(package private)  List<QpidArgument> arguments
          Argument list
 
Fields inherited from class org.apache.qpid.management.domain.model.QpidFeature
_description, _name
 
Constructor Summary
QpidMethod(String name, String description)
          Builds a new qpid method definition with the given name and description.
 
Method Summary
(package private)  void addArgument(QpidArgument argument)
          Adds an argument to this method.
 Map<String,Object> decodeParameters(byte[] values)
          Decodes the given input raw according to this method arguments definitions.
 void encodeParameters(Object[] parameters, org.apache.qpid.transport.codec.Encoder encoder)
          Encodes the given parameter values according to this method arguments definitions.
 String toString()
          Returns a string representation of this method.
 void validate(Object[] parameters)
          Validates the given array of parameters against the constraint defined on this method's arguments.
 
Methods inherited from class org.apache.qpid.management.domain.model.QpidFeature
getDescription, getName, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

arguments

List<QpidArgument> arguments
Argument list

Constructor Detail

QpidMethod

QpidMethod(String name,
           String description)
Builds a new qpid method definition with the given name and description.

Parameters:
name - the method name.
description - the method description.
Method Detail

addArgument

void addArgument(QpidArgument argument)
Adds an argument to this method.

Parameters:
argument - the new argument to be added.

toString

public String toString()
Returns a string representation of this method. The result format is (argType1 argName1 (Direction), argType2 argName2 (Direction), etc...)

Overrides:
toString in class QpidFeature
Returns:
a string representation of this method.

encodeParameters

public void encodeParameters(Object[] parameters,
                             org.apache.qpid.transport.codec.Encoder encoder)
Encodes the given parameter values according to this method arguments definitions. Note that only Input/Output and Input parameters are encoded.

Parameters:
parameters - the parameters values.
encoder - the encoder used for encoding.

decodeParameters

public Map<String,Object> decodeParameters(byte[] values)
Decodes the given input raw according to this method arguments definitions. Note that only Input/Output and Output parameters are encoded.

Parameters:
parameters - the parameters values.
encoder - the encoder used for encoding.

validate

public void validate(Object[] parameters)
              throws ValidationException
Validates the given array of parameters against the constraint defined on this method's arguments.

Parameters:
parameters - the parameters (values) to be validated.
Throws:
ValidationException - when one of the supplied values is violating some constraint.


Licensed to the Apache Software Foundation