Object Request Broker (ORB) - PowerPoint PPT Presentation

About This Presentation
Title:

Object Request Broker (ORB)

Description:

Internet Inter-Orb Protocol (IIOP) A binary protocol for communication between ORBs. ... Write code to initialize the ORB and inform it of any CORBA objects created ... – PowerPoint PPT presentation

Number of Views:214
Avg rating:3.0/5.0
Slides: 10
Provided by: shangp
Learn more at: http://www.cs.iit.edu
Category:

less

Transcript and Presenter's Notes

Title: Object Request Broker (ORB)


1
A First Java ORB Application
  • Object Request Broker (ORB)
  • This is the object manager in CORBA
  • Mechanisms for specifying interfaces
  • Interface Definition Language (IDL) - for static
    interface definitions
  • Dynamic Invocation Interface (DII) - lets clients
    access interfaces as first-class objects at
    run-time from an Interface Repository.
  • Internet Inter-Orb Protocol (IIOP)
  • A binary protocol for communication between ORBs.
  • Was added in CORBA 2.0

2
CORBA Application Development Process
  • Write IDL
  • Compile IDL
  • Identify the IDL compiler-generated interfaces
    and classes that we need
  • Write code to initialize the ORB and inform it of
    any CORBA objects created
  • Compile all the generated code and application
    code
  • Run the application

3
Building CORBA Application
  • Hello world

4
Interface Specification
  • // idl file
  • module helloWorld
  • interface GoodDay
  • string hello()
  • Compile the idl file, generate the following set
    of files
  • GoodDay.java
  • GoodDayHolder.java GoodDayHelper.java
  • _GoodDayStub.java GoodDayPOA.java
  • GoodDayOperations.java GoodDayPOATie.java

5
Generated Files
  • GoodDay.java java interface mapped from IDL
    interface
  • GoodDayHolder provide support to handle IDL
    inout and out parameters
  • GoodDayHelper contains supporting methods, most
    used one is narrow()
  • _GoodDayStub.java client side stub code
  • GoodDayPOA.java contains the skeleton code that
    is used with POA
  • GoodDayOperations.java and GoodDayPOATie.java
    contain skeleton code that are used with Tie
    approach

6
Client Side
  • Initialize the CORBA environment obtain a
    reference to the ORB
  • Obtain an object reference for the object on
    which to invoke operations
  • Invoke operation and process the results
  • Example
  • Code from Ch. 4

7
Server Side
  • Initialize the CORBA environment, the ORB (the
    same as client side)
  • Create implementation object
  • Make the implementation object accessible by
    clients
  • Listens for events
  • Code
  • Ch4 server code

8
Holder Type for out and inout parameters

shorterHolder minute
Holder Object
public short value
9
Extending the Hello Example
  • string hello(out short hour, out short minute)
Write a Comment
User Comments (0)
About PowerShow.com