rmic stub generation

I

indo3

Hello,
I have a question to Java RMI:
why does rmic need the Server Implementation class as input and
not can be satisfied with the inferface file? Since i thouhgt
the client just dont need to know anything about the "implementation"
of the remote object
but only about its interface.

Thanks
 
E

Esmond Pitt

indo3 said:
I have a question to Java RMI:
why does rmic need the Server Implementation class as input and
not can be satisfied with the inferface file?

Because a remote object may implement more than one remote interface,
and its stub must do the same.
 
I

indo3

Esmond Pitt said:
Because a remote object may implement more than one remote interface,
and its stub must do the same.

Ok but what IF its wanted that only one interface is exposed to one client,
another interface is exposed to another client for the same remote object,
since the remote object may hold the data base for both clients but both
clients want to use the object complete different (with different methods)?
Can this be modeled?
 
E

Esmond Pitt

indo3 said:
Ok but what IF its wanted that only one interface is exposed to one client,
another interface is exposed to another client for the same remote object,
since the remote object may hold the data base for both clients but both
clients want to use the object complete different (with different methods)?
Can this be modeled?

Sure, just cast Naming.lookup() to the desired interface in each case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top