PL/SQL Packages and Types Reference 10g Release 1 (10.1) Part Number B10802-01 |
|
|
View PDF |
DBMS_MGWMSG
provides:
See Also:
Chapter 51, "DBMS_MGWADM" which describes the Messaging Gateway administrative interface, |
This chapter contains the following topics:
The DBMS_MGWMSG
packages and object types are owned by SYS
.
Note: You must run the |
Value | Constant |
---|---|
|
|
|
|
Value | Constant |
---|---|
|
|
|
|
This type specifies a named value. The name
attribute, type
attribute, and one of the <>_value
attributes are typically not NULL
.
TYPE SYS.MGW_NAME_VALUE_T IS OBJECT( name VARCHAR2(250), type INTEGER, integer_value INTEGER, number_value NUMBER, text_value VARCHAR2(4000), raw_value RAW(2000), date_value DATE, -- Methods STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_BOOLEAN ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_BYTE ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_SHORT ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_INTEGER ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_LONG ( name IN VARCHAR2, value IN NUMBER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_FLOAT ( name IN VARCHAR2, value IN NUMBER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_DOUBLE ( name IN VARCHAR2, value IN NUMBER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_TEXT ( name IN VARCHAR2, value IN VARCHAR2 ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_RAW ( name IN VARCHAR2, value IN RAW ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_DATE ( name IN VARCHAR2, value IN DATE ) RETURN SYS.MGW_NAME_VALUE_T );
Attribute | Description |
---|---|
|
Name associated with the value |
|
Value type. Refer to the |
|
Stores a numeric integer value |
|
Stores a numeric float or large integer value |
|
Stores a text value |
|
Stores a |
|
Stores a date value |
Table 52-6 shows the mapping between the value type and the attribute used to store the value.
This method constructs a new SYS.MGW_NAME_VALUE_T
instance. All attributes are assigned a value of NULL
.
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_NAME_VALUE_T;
These methods construct a new SYS.MGW_NAME_VALUE_T
instance initialized with the value of a specific type. Each method sets the name
and type
attributes and one of the <>_value
attributes, as shown in the mappings in Table 52-6.
STATIC FUNCTION CONSTRUCT_<> ( name IN VARCHAR2, value IN datatype ) RETURN SYS.MGW_NAME_VALUE_T;
The construct_boolean
method sets the value to either DBMS_MGWMSG.BOOLEAN_TRUE
or DBMS_MGWMSG.BOOLEAN_FALSE
.
This type specifies an array of name-value pairs. An object of SYS.MGW_NAME_VALUE_ARRAY_T
type can have up to 1024 elements.
TYPE SYS.MGW_NAME_VALUE_ARRAY_T AS VARRAY (1024) OF SYS.MGW_NAME_VALUE_T;
This type specifies a TEXT
value. It can store a large value as a CLOB
or a smaller value (size <= 4000) as VARCHAR2.
Only one of the < >_ value
attributes should be set.
TYPE SYS.MGW_TEXT_VALUE_T IS OBJECT( small_value VARCHAR2(4000), large_value CLOB, -- Methods STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_TEXT_VALUE_T);
Attribute | Description |
---|---|
|
Small |
|
Large |
This method constructs a new SYS.MGW_TEXT_VALUE_T
instance. All attributes are assigned a value of NULL
.
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_TEXT_VALUE_T;
This type specifies a RAW
value. This type can store a large value as a BLOB
or a smaller value (size <= 2000) as RAW
. You must set no more than one of the < >_value
attributes.
TYPE SYS.MGW_RAW_VALUE_T IS OBJECT( small_value RAW(2000), large_value BLOB, --Methods STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_RAW_VALUE_T);
Attribute | Description |
---|---|
|
Small |
|
Large |
This method constructs a new SYS.MGW_RAW_VALUE_T
instance. All attributes are assigned a value of NULL
.
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_RAW_VALUE_T;
This is a canonical type for a basic TEXT
or RAW
message. Only a single TEXT
or RAW
value is typically set. An object of this type must not have both TEXT
and RAW
set to a not NULL
value at the same time.
TYPE SYS.MGW_BASIC_MSG_T IS OBJECT( header SYS.MGW_NAME_VALUE_ARRAY_T, text_body SYS.MGW_TEXT_VALUE_T, raw_body SYS.MGW_RAW_VALUE_T, --Methods STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_BASIC_MSG_T);
Attribute | Description |
---|---|
|
Message header information as an array of name-value pairs |
|
Message body for a |
|
Message body for a |
This method constructs a new SYS.MGW_BASIC_MSG_T
instance. All attributes are assigned a value of NULL
.
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_BASIC_MSG_T;
A type that specifies an array of numbers.
TYPE SYS.MGW_NUMBER_ARRAY_T AS VARRAY(1024) OF NUMBER;
A type representing a TIB/Rendezvous message field, typically used in a read-only fashion to retrieve field information from a SYS.MGW_TIBRV_MSG_T
instance.
TYPE SYS.MGW_TIBRV_FIELD_T IS OBJECT( field_name VARCHAR2(256), field_id INTEGER, field_type INTEGER, number_value NUMBER, number_array_value SYS.MGW_NUMBER_ARRAY_T, text_value VARCHAR2(4000), raw_value RAW(2000), date_value DATE, clob_value CLOB, blob_value BLOB);
Table 52-11 describes the mapping in type SYS.MGW_TIBRV_FIELD_T
between the field type and attribute used to store the value.
A type representing a TIB/Rendezvous message. You must never directly reference the attributes of this type. Instead use the type methods.
TYPE SYS.MGW_TIBRV_MSG_T IS OBJECT( send_subject VARCHAR2(256), reply_subject VARCHAR2(256), cm_time_limit NUMBER, cm_sender_name VARCHAR2(256), cm_sequence_num NUMBER, fields SYS.MGW_TIBRV_IFIELDS_T, clob_data1 CLOB, clob_data2 CLOB, clob_data3 CLOB, blob_data1 BLOB, blob_data2 BLOB, blob_data3 BLOB, STATIC FUNCTION construct RETURN SYS.MGW_TIBRV_MSG_T, MEMBER PROCEDURE add_bool ( name IN VARCHAR2, id IN INTEGER, value IN INTEGER ), MEMBER PROCEDURE add_f32 ( name IN VARCHAR2, id IN INTEGER, value IN FLOAT ), MEMBER PROCEDURE add _f64 ( name IN VARCHAR2, id IN INTEGER, value IN DOUBLE ), MEMBER PROCEDURE add_i8 ( name IN VARCHAR2, id IN INTEGER, value IN INTEGER ), MEMBER PROCEDURE add_i16 ( name IN VARCHAR2, id IN INTEGER, value IN INTEGER ), MEMBER PROCEDURE add_i32 ( name IN VARCHAR2, id IN INTEGER, value IN INTEGER ), MEMBER PROCEDURE add_i64 ( name IN VARCHAR2, id IN INTEGER, value IN NUMBER ), MEMBER PROCEDURE add_ipaddr32 ( name IN VARCHAR2, id IN INTEGER, value IN VARCHAR2 ), MEMBER PROCEDURE add_ipport16 ( name IN VARCHAR2, id IN INTEGER, value IN INTEGER ), MEMBER PROCEDURE add_datetime ( name IN VARCHAR2, id IN INTEGER, value IN DATE ), MEMBER PROCEDURE add_f32array ( name IN VARCHAR2, id IN INTEGER, value IN SYS.MGW_NUMBER_ARRAY_T ), MEMBER PROCEDURE add_f64array ( name IN VARCHAR2, id IN INTEGER, value IN SYS.MGW_NUMBER_ARRAY_T ), MEMBER PROCEDURE add_i8array ( name IN VARCHAR2, id IN INTEGER, value IN SYS.MGW_NUMBER_ARRAY_T ), MEMBER PROCEDURE add_i16array ( name IN VARCHAR2, id IN INTEGER, value IN SYS.MGW_NUMBER_ARRAY_T ), MEMBER PROCEDURE add_i32array ( name IN VARCHAR2, id IN INTEGER, value IN SYS.MGW_NUMBER_ARRAY_T ), MEMBER PROCEDURE add_i64array ( name IN VARCHAR2, id IN INTEGER, value IN SYS.MGW_NUMBER_ARRAY_T ), MEMBER PROCEDURE add_string ( name IN VARCHAR2, id IN INTEGER, value IN VARCHAR2 ), MEMBER PROCEDURE add_string ( name IN VARCHAR2, id IN INTEGER, value IN CLOB ), MEMBER PROCEDURE add_opaque ( name IN VARCHAR2, id IN INTEGER, value IN RAW ), MEMBER PROCEDURE add_opaque ( name IN VARCHAR2, id IN INTEGER, value IN BLOB ), MEMBER PROCEDURE add_xml ( name IN VARCHAR2, id IN INTEGER, value IN RAW ), MEMBER PROCEDURE add_xml ( name IN VARCHAR2, id IN INTEGER, value IN BLOB ), MEMBER PROCEDURE set_send_subject ( value IN VARCHAR2 ), MEMBER PROCEDURE set_reply_subject ( value IN VARCHAR2 ), MEMBER PROCEDURE set_cm_time_limit ( value IN NUMBER ), MEMBER PROCEDURE set_cm_sender_name ( value IN VARCHAR2 ), MEMBER PROCEDURE set_cm_sequence_num ( value IN NUMBER ), MEMBER FUNCTION get_send_subject RETURN VARCHAR2, MEMBER FUNCTION get_reply_subject RETURN VARCHAR2, MEMBER FUNCTION get_cm_time_limit RETURN NUMBER, MEMBER FUNCTION get_cm_sender_name RETURN VARCHAR2, MEMBER FUNCTION get_cm_sequence_num RETURN NUMBER, MEMBER FUNCTION get_field_count RETURN INTEGER, MEMBER FUNCTION get_field ( idx IN INTEGER ) RETURN SYS.MGW_TIBRV_FIELD_T, MEMBER FUNCTION get_field_by_name ( name IN VARCHAR2 ) RETURN SYS.MGW_TIBRV_FIELD_T, MEMBER FUNCTION get_field_by_id ( id IN INTEGER ) RETURN SYS.MGW_TIBRV_FIELD_T, MEMBER FUNCTION find_field_name ( name IN VARCHAR2, start_idx IN INTEGER ) RETURN INTEGER, MEMBER FUNCTION find_field_id ( id IN INTEGER, start_idx IN INTEGER ) RETURN INTEGER );
Constructs a new SYS.MGW_TIBRV_MSG_T
instance. All attributes are set to NULL
.
STATIC FUNCTION construct RETURN SYS.MGW_TIBRV_MSG_T;
Adds a new field to the message.
MEMBER PROCEDURE ADD_<> ( name IN VARCHAR2, id IN INTEGER, value IN datatype );
Parameter | Description |
---|---|
|
Field name |
|
Field identifier |
|
Field data |
Table 52-14 shows, for each add method, the field type that will be assigned and valid values for the field data.
Accessor methods to set an instance attribute to a specific value.
MEMBER PROCEDURE SET_<> ( value IN datatype );
Parameter | Description |
---|---|
|
Value to be assigned |
Accessor methods to retrieve the value for an instance attribute.
MEMBER PROCEDURE GET_<> RETURN datatype;
None
Returns the attribute value.
Gets the number of message fields.
MEMBER PROCEDURE get_field_count RETURN INTEGER;
None
Returns the number of fields, or zero (0) if there are none.
Retrieves field information for the field having a given field collection index. This method should only be called if get_field_count()
returns a nonzero value and idx
must specify a valid collection index; that is, 1<=idx<=get_field_count()
.
MEMBER PROCEDURE get_field ( idx IN INTEGER ) RETURN SYS.MGW_TIBRV_FIELD_T;
Parameter | Description |
---|---|
|
Specifies the 1-based field collection index of the field to retrieve |
Returns the field information.
Retrieves field information for the first field that has a given field name. The name comparison is case-sensitive.
MEMBER PROCEDURE get_field_by_name ( name IN VARCHAR2 ) RETURN SYS.MGW_TIBRV_FIELD_T;
Parameter | Description |
---|---|
|
Specifies the field name to search for. This can be |
Returns the field information, or NULL
if no match was found.
Retrieves field information for the first field that has a given field identifier.
A field can have either a unique identifier or no identifier. If the field identifier value is zero (0) or NULL
, then the field is considered to have no identifier. Otherwise, the identifier is a nonzero value that is unique for all the fields of this message.
MEMBER PROCEDURE get_field_by_id ( id IN INTEGER ) RETURN SYS.MGW_TIBRV_FIELD_T;
Parameter | Description |
---|---|
|
Specifies the field identifier to search for. This can be zero (0) or |
Returns the field information, or NULL
if no match was found.
Searches for a field with a given field name, starting from a given index of the field collection. It returns the index of that field. The name comparison is case-sensitive. This function is useful for finding all the fields that have the same name.
MEMBER PROCEDURE find_field_name ( name IN VARCHAR2, start_idx IN INTEGER ) RETURN INTEGER;
Returns the field index (> 0) if a match was found, or zero (0) if no match was found.
Searches for a field with a given field identifier, starting from a given index of the field collection. It returns the index of that field.
MEMBER PROCEDURE find_field_id ( id IN INTEGER, start_idx IN INTEGER ) RETURN INTEGER;
Returns the field index (> 0) if a match was found, or zero (0) if no match was found.
This procedure appends a name-value element to the end of a name-value array.
DBMS_MGWMSG.NVARRAY_ADD ( p_array IN OUT SYS.MGW_NAME_VALUE_ARRAY_T, p_value IN SYS.MGW_NAME_VALUE_T );
This function gets the name-value element of the name you specify in p_name
from a name-value array.
DBMS_MGWMSG.NVARRAY_GET ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN SYS.MGW_NAME_VALUE_T;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the matching element, or NULL
if the specified name is not found.
This function gets the value of the name-value array element that you specify in p_name
and with the BOOLEAN_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_BOOLEAN ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name
and with the BYTE_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_BYTE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name
and with the SHORT_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_SHORT ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name
and with the INTEGER_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_INTEGER ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name
and with the LONG_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_LONG ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN NUMBER;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name
and with the FLOAT_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_FLOAT ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN NUMBER;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name
and with the DOUBLE_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_DOUBLE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN NUMBER;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name
and with the TEXT_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_TEXT ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN VARCHAR2;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name
and with the RAW_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_RAW ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN RAW;
Parameter | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name
and with the DATE_VALUE
value type.
DBMS_MGWMSG.NVARRAY_GET_DATE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN DATE;
Parameters | Description |
---|---|
|
The name-value array |
|
The value name |
|
Name comparison method. Values are |
Returns the value, or NULL
if either the specified name is not found or a type mismatch exists.
This function searches a name-value array for the element with the name you specify in p_name
.
DBMS_MGWMSG.NVARRAY_FIND_NAME ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN BINARY_INTEGER;
Parameters | Description |
---|---|
|
The name-value array to search |
|
The name to find |
|
Name comparison method. Values are |
Returns a positive integer that is the array index of the matching element or zero (0)
if the specified name is not found.
This function searches a name-value array for an element with the name and value type you specify.
DBMS_MGWMSG.NVARRAY_FIND_NAME_TYPE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_type IN BINARY_INTEGER p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN BINARY_INTEGER;
Parameter | Description |
---|---|
|
The name-value array to search |
|
The name to find |
|
The value type. Refer to the value type constants in Table 52-1 . |
|
Name comparison method. Values are |
Returns a positive integer that is the array index of the matching element, zero (0)
if the specified name is not found, or negative one (-1) if the specified name is found but a type mismatch exists.