Class: ODPI::Dpi::MsgProps

Inherits:
Object
  • Object
show all
Defined in:
ext/odpi_ext/rbdpi-msg-props.c

Instance Method Summary collapse

Constructor Details

#initializeObject


41
42
43
44
45
# File 'ext/odpi_ext/rbdpi.c', line 41

VALUE rbdpi_initialize_error(VALUE self)
{
    rb_raise(rb_eRuntimeError, "could not initialize by %s::new", rb_obj_classname(self));
    return Qnil;
}

Instance Method Details

#correlationObject


78
79
80
81
82
83
84
85
86
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 78

static VALUE msg_props_get_correlation(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    const char *val;
    uint32_t len;

    CHK(dpiMsgProps_getCorrelation(msg_props->handle, &val, &len));
    return rb_external_str_new_with_enc(val, len, msg_props->enc);
}

#correlation=(val) ⇒ Object


162
163
164
165
166
167
168
169
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 162

static VALUE msg_props_set_correlation(VALUE self, VALUE val)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);

    CHK_STR_ENC(val, msg_props->enc);
    CHK(dpiMsgProps_setCorrelation(msg_props->handle, RSTRING_PTR(val), RSTRING_LEN(val)));
    return val;
}

#delayObject


88
89
90
91
92
93
94
95
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 88

static VALUE msg_props_get_delay(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    int32_t val;

    CHK(dpiMsgProps_getDelay(msg_props->handle, &val));
    return INT2NUM(val);
}

#delay=(val) ⇒ Object


171
172
173
174
175
176
177
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 171

static VALUE msg_props_set_delay(VALUE self, VALUE val)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);

    CHK(dpiMsgProps_setDelay(msg_props->handle, NUM2INT(val)));
    return val;
}

#delivery_modeObject


97
98
99
100
101
102
103
104
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 97

static VALUE msg_props_get_delivery_mode(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    dpiMessageDeliveryMode val;

    CHK(dpiMsgProps_getDeliveryMode(msg_props->handle, &val));
    return rbdpi_from_dpiMessageDeliveryMode(val);
}

#enq_timeObject


106
107
108
109
110
111
112
113
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 106

static VALUE msg_props_get_enq_time(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    dpiTimestamp val;

    CHK(dpiMsgProps_getEnqTime(msg_props->handle, &val));
    return rbdpi_from_dpiTimestamp(&val, DPI_ORACLE_TYPE_DATE);
}

#exception_qObject


115
116
117
118
119
120
121
122
123
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 115

static VALUE msg_props_get_exception_q(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    const char *val;
    uint32_t len;

    CHK(dpiMsgProps_getExceptionQ(msg_props->handle, &val, &len));
    return rb_external_str_new_with_enc(val, len, msg_props->enc);
}

#exception_q=(val) ⇒ Object


179
180
181
182
183
184
185
186
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 179

static VALUE msg_props_set_exception_q(VALUE self, VALUE val)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);

    CHK_STR_ENC(val, msg_props->enc);
    CHK(dpiMsgProps_setExceptionQ(msg_props->handle, RSTRING_PTR(val), RSTRING_LEN(val)));
    return val;
}

#expirationObject


125
126
127
128
129
130
131
132
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 125

static VALUE msg_props_get_expiration(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    int32_t val;

    CHK(dpiMsgProps_getExpiration(msg_props->handle, &val));
    return INT2NUM(val);
}

#expiration=(val) ⇒ Object


188
189
190
191
192
193
194
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 188

static VALUE msg_props_set_expiration(VALUE self, VALUE val)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);

    CHK(dpiMsgProps_setExpiration(msg_props->handle, NUM2INT(val)));
    return val;
}

#initialize_copy(other) ⇒ Object


58
59
60
61
62
63
64
65
66
67
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 58

static VALUE msg_props_initialize_copy(VALUE self, VALUE other)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);

    *msg_props = *rbdpi_to_msg_props(other);
    if (msg_props->handle != NULL) {
        CHK(dpiMsgProps_addRef(msg_props->handle));
    }
    return self;
}

#num_attemptsObject


69
70
71
72
73
74
75
76
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 69

static VALUE msg_props_get_num_attempts(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    int32_t val;

    CHK(dpiMsgProps_getNumAttempts(msg_props->handle, &val));
    return INT2NUM(val);
}

#original_msg_idObject


134
135
136
137
138
139
140
141
142
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 134

static VALUE msg_props_get_original_msg_id(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    const char *val;
    uint32_t len;

    CHK(dpiMsgProps_getOriginalMsgId(msg_props->handle, &val, &len));
    return rb_external_str_new_with_enc(val, len, msg_props->enc);
}

#original_msg_id=(val) ⇒ Object


196
197
198
199
200
201
202
203
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 196

static VALUE msg_props_set_original_msg_id(VALUE self, VALUE val)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);

    CHK_STR_ENC(val, msg_props->enc);
    CHK(dpiMsgProps_setOriginalMsgId(msg_props->handle, RSTRING_PTR(val), RSTRING_LEN(val)));
    return val;
}

#priorityObject


144
145
146
147
148
149
150
151
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 144

static VALUE msg_props_get_priority(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    int32_t val;

    CHK(dpiMsgProps_getPriority(msg_props->handle, &val));
    return INT2NUM(val);
}

#priority=(val) ⇒ Object


205
206
207
208
209
210
211
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 205

static VALUE msg_props_set_priority(VALUE self, VALUE val)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);

    CHK(dpiMsgProps_setPriority(msg_props->handle, NUM2INT(val)));
    return val;
}

#stateObject


153
154
155
156
157
158
159
160
# File 'ext/odpi_ext/rbdpi-msg-props.c', line 153

static VALUE msg_props_get_state(VALUE self)
{
    msg_props_t *msg_props = rbdpi_to_msg_props(self);
    dpiMessageState val;

    CHK(dpiMsgProps_getState(msg_props->handle, &val));
    return rbdpi_from_dpiMessageState(val);
}