Chapter 20 corba fm



Download 234.39 Kb.
View original pdf
Page4/28
Date06.12.2022
Size234.39 Kb.
#60082
1   2   3   4   5   6   7   8   9   ...   28
Chapter 20 CORBA
Soft computing Lab Mannual, Distributed systems
Figure 20.1
IDL interfaces Shape and ShapeList
struct Rectangle{
1
long width
long height;
long x;
long y;
} ;
struct GraphicalObject {
2
string type
Rectangle enclosing
boolean isFilled;
};
interface Shape {
3
long getVersion() ;
GraphicalObject getAllState() ; // returns state of the GraphicalObject
};
typedef sequence All;
4
interface ShapeList {
5
exception FullException{ };
6
Shape newShape(in GraphicalObject g) raises (FullException);
7
All allShapes(); // returns sequence of remote object references 8
long getVersion() ;
};

SECTION 20.2
CORBA RMI
831
Type

Object
:

Object
is the name of a type whose values are remote object references. It is effectively a common supertype of all of IDL interface types such as

Shape
and

ShapeList
Exceptions in CORBA IDL:
CORBA IDL allows exceptions to be defined in interfaces and thrown by their methods. To illustrate this point, we have defined our list of shapes in the server as a sequence of a fixed length (line 4) and have defined

FullException
(line
6), which is thrown by the method

newShape
(line 7) if the client attempts to add a shape when the sequence is full.
Invocation semantics Remote invocation in CORBA has

at-most-once
call semantics as the default. However, IDL may specify that the invocation of a particular method has

maybe
semantics by using the

oneway
keyword. The client does not block on

oneway
requests, which can be used only for methods without results. For an example of a

oneway
request, seethe example on callbacks at the end of Section 20.2.1.

Download 234.39 Kb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   28




The database is protected by copyright ©ininet.org 2024
send message

    Main page