galaxy.server
Class Signature

java.lang.Object
  |
  +--galaxy.server.Signature

public class Signature
extends java.lang.Object


Field Summary
static int GAL_KEY_ALWAYS
          Existence.
static int GAL_KEY_SOMETIMES
           
static int GAL_OTHER_KEYS_MAYBE
          Strictness GAL_OTHER_KEYS_MAYBE - other keys may be present in message GAL_OTHER_KEYS_NEVER - no undeclared keys are allowed in message
static int GAL_OTHER_KEYS_NEVER
           
static int GAL_REPLY_NONE
           
static int GAL_REPLY_PROVIDED
          Return type Used by the hub to check program file correctness (at run time) as well as by server libraries to check for consistent behavior.
static int GAL_REPLY_UNKNOWN
           
 
Constructor Summary
Signature(java.lang.String name)
           
Signature(java.lang.String name, SigEntry[] inkeys, int instrict, SigEntry[] outkeys, int outstrict, int reply)
          Creates a new signature for operation name
 
Method Summary
 java.lang.String getName()
           
 GVector toGVector()
          Converts this Signature into a GVector.
 boolean validateInput(GFrame frame, Server server)
          Validates this frame according to this signature.
 boolean validateOutput(GFrame frame, Server server)
          Validates this frame according to this signature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GAL_KEY_ALWAYS

public static final int GAL_KEY_ALWAYS
Existence. Used to define the existence of a certain key within a signature

GAL_KEY_SOMETIMES

public static final int GAL_KEY_SOMETIMES

GAL_OTHER_KEYS_MAYBE

public static final int GAL_OTHER_KEYS_MAYBE
Strictness

GAL_OTHER_KEYS_NEVER

public static final int GAL_OTHER_KEYS_NEVER

GAL_REPLY_PROVIDED

public static final int GAL_REPLY_PROVIDED
Return type Used by the hub to check program file correctness (at run time) as well as by server libraries to check for consistent behavior. Possible types are:

GAL_REPLY_NONE

public static final int GAL_REPLY_NONE

GAL_REPLY_UNKNOWN

public static final int GAL_REPLY_UNKNOWN
Constructor Detail

Signature

public Signature(java.lang.String name,
                 SigEntry[] inkeys,
                 int instrict,
                 SigEntry[] outkeys,
                 int outstrict,
                 int reply)
Creates a new signature for operation name
See Also:
SigEntry

Signature

public Signature(java.lang.String name)
Parameters:
name - Name of the operation for which this is a signature

Creates a signature with the following defaults:

  • inkeys = null
  • instrict = GAL_OTHER_KEYS_MAYBE
  • outkeys = null
  • outstrict = GAL_OTHER_KEYS_MAYBE
  • reply = GAL_REPLY_UNKNOWN
Method Detail

getName

public java.lang.String getName()
Returns:
the name of the operation this Signature refers to

validateInput

public boolean validateInput(GFrame frame,
                             Server server)
Validates this frame according to this signature.
Parameters:
frames - Incoming message to be validated
server - Server object, used to pass loging information back

Keys excluded from validation:

  • :tidx
  • :hub_opaque_data
  • :server_id
  • :session_id
  • :reply_requested

validateOutput

public boolean validateOutput(GFrame frame,
                              Server server)
Validates this frame according to this signature

Keys excluded from validation:

See Also:
validateInput(galaxy.lang.GFrame, galaxy.server.Server)

toGVector

public GVector toGVector()
Converts this Signature into a GVector. Also know as List