Codemesh Runtime v3 C++ API Reference
3.9.205
|
Go to the documentation of this file.
17 #ifndef __XMOG_REPLY_H
18 #define __XMOG_REPLY_H
20 class ACE_Message_Block;
21 #include "ace/Basic_Types.h"
24 #include "xmog_util.h"
25 #include "xmog_java_value.h"
53 typedef enum { SUCCESS = 1, TIMEOUT, COMM_FAILURE }
Disposition;
55 enum { INIT_BLOCK_SIZE = 4096 };
68 ACE_Message_Block *b = 0);
89 virtual bool unmarshal (
void) {
return false; }
152 int readUTF(
char ** str, jint * len = NULL );
202 ACE_Message_Block *b_;
212 enum sign_on_status {
214 STATUS_NO_NEW_SESSIONS = 1,
215 STATUS_NOT_AUTHORIZED = 2,
216 STATUS_SHUTTING_DOWN = 3,
217 STATUS_UNSUPPORTED_PROTOCOL = 4
221 :
xmog_reply (xmog_reply::SUCCESS, xmog::SIGN_ON_STATUS, b) {}
223 sign_on_status status (
void)
const;
225 jint RemoteStringUtilsId()
const;
227 jint ObjectId()
const;
229 jint ClassId()
const;
231 jint ThrowableId()
const;
233 jint ExceptionId()
const;
235 jint StringId()
const;
238 virtual bool unmarshal (
void);
241 sign_on_status status_;
243 jint clsRemoteStringUtils_;
249 jbyte required_major_version_;
257 :
xmog_reply (xmog_reply::SUCCESS, xmog::THREAD_ID_ASSIGNMENT, b) {}
259 jint assigned_thread_id (
void)
const {
return this->assigned_thread_id_; }
260 void *originator (
void)
const {
return this->originator_; }
264 virtual bool unmarshal (
void);
269 jint assigned_thread_id_;
277 :
xmog_reply (xmog_reply::SUCCESS, xmog::MEMBER_IDS_ASSIGNMENT, b),
280 jclass getClassId (
void)
const {
return this->class_id_; }
281 jsize getNumMembers()
const {
return this->numMembers_; }
282 jint getMemberId(
size_t index )
const {
return memberIds_[ index ]; }
283 void *originator (
void)
const {
return this->originator_; }
289 virtual bool unmarshal (
void);
314 void set_class( jint
id ) { id_ = id; }
315 jint get_class()
const {
return id_; }
317 char * get_class_name()
const {
return name_; }
318 void set_super( jint
id ) { super_ = id; }
319 jint get_super()
const {
return super_; }
320 void set_num_ifcs( jint num ) { numIfcs_ = num; ifcs_ =
new jint[ numIfcs_ ]; }
321 jsize get_num_ifcs()
const {
return numIfcs_; }
322 void set_ifc(
int index, jint
id ) { ifcs_[ index ] = id; }
323 jint get_ifc(
int index )
const {
return ifcs_[ index ]; }
332 :
xmog_reply (xmog_reply::SUCCESS, xmog::CLASS_INFO_RESPONSE, b),
335 jsize getNumInfos()
const {
return this->numInfos_; }
336 class_info & getInfo(
size_t index )
const {
return infos_[ index ]; }
337 void *originator (
void)
const {
return this->originator_; }
343 virtual bool unmarshal (
void);
355 :
xmog_reply (xmog_reply::SUCCESS, xmog::GET_FIELD_RESPONSE, b) {}
357 void * originator (
void)
const {
return this->originator_; }
360 jlong getException()
const {
return (jlong)exc_.exc_; }
364 virtual bool unmarshal (
void);
378 :
xmog_reply (xmog_reply::SUCCESS, xmog::SET_FIELD_RESPONSE, b) {}
380 void * originator (
void)
const {
return this->originator_; }
381 jlong getException()
const {
return (jlong)exc_.exc_; }
386 virtual bool unmarshal (
void);
400 :
xmog_reply (xmog_reply::SUCCESS, xmog::METHOD_RETURN, b) {}
402 jint thread_id()
const {
return thread_id_; }
403 void * originator (
void)
const {
return this->originator_; }
406 jlong getException()
const {
return (jlong)exc_.exc_; }
410 virtual bool unmarshal (
void);
424 :
xmog_reply (xmog_reply::SUCCESS, xmog::CONSTRUCTOR_RETURN, b) {}
426 jint thread_id()
const {
return thread_id_; }
427 void * originator (
void)
const {
return this->originator_; }
430 jlong getException()
const {
return (jlong)exc_.exc_; }
434 virtual bool unmarshal (
void);
static char * setString(char *&strVar, const char *value, size_t len=(size_t) -1)
Sets a string to another string after cleaning up the previous string.
Definition: xmog_reply.h:273
int readInt(jint &i)
Reads a 32bit integer from the message.
bool matches(const xmog_request *req) const
Check to see if the specified xmog_request matches this xmog_reply. The reply type needs to match the...
bool matches(const xmog_request *req) const
Check to see if the specified xmog_request matches this xmog_reply. The reply type needs to match the...
int readBoolean(bool &b)
Reads a bool from the message.
Represents a request communicated between client and server.
Definition: xmog_request.h:50
Disposition
The Disposition indicates whether the requested operation was even carried out. If not SUCCESS,...
Definition: xmog_reply.h:53
int readByte(jbyte &b)
Reads a byte from the message.
A helper type used to convey remote Java arguments around.
Definition: xmog_java_value.h:20
Definition: xmog_reply.h:328
static xmog_reply * decode(ACE_Message_Block *b)
Factory function that decodes an incoming reply and creates a xmog_reply-descended reply object.
bool matches(const xmog_request *req) const
Check to see if the specified xmog_request matches this xmog_reply. The reply type needs to match the...
int readFloat(jfloat &f)
Reads a jfloat from the message.
int readDouble(jdouble &d)
Reads a jdouble from the message.
int readStringProxy(xmog_remote_java_value &data, xmog::xmog_data_code code)
Reads a string proxy from the message.
int readChar(jchar &c)
Reads a jchar from the message.
bool matches(const xmog_request *req) const
Check to see if the specified xmog_request matches this xmog_reply. The reply type needs to match the...
int readUTF(char **str, jint *len=NULL)
Reads a UTF string from the message.
int read_data_code(xmog::xmog_data_code &code)
Reads a data code.
xmog_message_id
The message types that are used in the framework.
Definition: xmog_message_types.h:26
A utility class used to hold on to exceptions thrown on the other side.
Definition: xmog_java_value.h:68
virtual bool matches(const xmog_request *req) const
Check to see if the specified xmog_request matches this xmog_reply. The reply type needs to match the...
Definition: xmog_reply.h:299
bool matches(const xmog_request *req) const
Check to see if the specified xmog_request matches this xmog_reply. The reply type needs to match the...
Definition: xmog_reply.h:420
Definition: xmog_reply.h:253
Definition: xmog_reply.h:351
Definition: xmog_reply.h:209
Definition: xmog_reply.h:374
int readLongUTF(char **str, jint *len=NULL)
Reads a long UTF string from the message.
int readShort(jshort &s)
Reads a 16bit integer from the message.
Definition: xmog_reply.h:31
int readData(xmog_remote_java_value &data)
Reads a data object from the message.
xmog::xmog_message_id type(void) const
type() returns the message reply type. If the disposition is not SUCCESS, this value is meaningless.
int readClassName(char **str)
Reads a UTF string from the message.
int readExc(xmog_remote_java_exception &data)
Reads an exception from the message.
int readDataProxy(xmog_remote_java_value &data)
Reads a data proxy object from the message.
bool matches(const xmog_request *req) const
Check to see if the specified xmog_request matches this xmog_reply. The reply type needs to match the...
bool matches(const xmog_request *req) const
Check to see if the specified xmog_request matches this xmog_reply. The reply type needs to match the...
Definition: xmog_reply.h:396
int readLong(jlong &l)
Reads a 64-bit integer from the message.
Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.