[Biojava-l] Corba
Matthew Pocock
mrp@sanger.ac.uk
Thu, 10 Feb 2000 13:27:08 +0000
Dear all,
I have checked in the biocorba classes under
biojava-live/src/org/biocorba, and the biojava bridge code under
biojava-live/src/org/biojava/bridge/biocorba. It complies to the first
IDL that Ewan produced. It is realy there for you to look at and play
with while everything settles down.
The *Impl.java files provide the wrappers around biojava objects so that
they can provide the data and behaviour for the corba server.
The *Adapter.java files wrap corba objects and implement biojava
interfaces.
The scheim for the server is more complicated than usual as we are
mapping between two interface hierachies, not just between interfaces
and classes.
corba interface : interface
(org.biocorba.bio.Seq)
|
| implemented by
V
corba servants : _interfaceImplBase
(org.biocorba.bio._SeqImplBase)
|
| inherited by
V
_interface_tie
(org.biocorba.bio._Seq_tie)
|
| delegates to
V
_interface_operations
(org.biocorba.bio._Seq_operations)
|
java implementation : | implemented by
V
interfaceImpl
(org.biojava.bridge.biocorba.bio.SeqImpl)
The delegation relationship is a bit more confusing than normal, as the
delegates need some way of getting at the corba layer, while still
allowing one Impl class to inherit from another. This is done by adding
the _tie object as the first argument to all operations methods (to give
a sort of double binding). So:
Seq.features_region(int start, int end)
implies
_Seq_operations.features_region(
org.omg.CORBA.portable.ObjectImpl seq,
int start, int end)
where seq is guaranteed to be castable to Seq, SeqImpl and _Seq_tie.
The corresponding proxy method in _Seq_tie becomes:
features_region(start, end) {
return servant.features_region(this, start, end);
}
All of this munging should be done automaticaly. We should realy have a
script that does this...
Matthew