Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 546355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:51:30+00:00 2026-05-13T10:51:30+00:00

Hey guys, I have an interesting one for you here! I have one object,

  • 0

Hey guys, I have an interesting one for you here!

I have one object, called Server, that implements two RMI interfaces, CSCP and ISCP.
I need my Clients to be able to communicate on the RMI CSCP interface, but know nothing of the ISCP interface, and I need other servers to communicate with it on the ISCP interface but know nothing of the CSCP interface. With me so far?

Basically, at the moment I have it set up so that it binds twice, once to “ISCP” in the rmiregistry, and once to “CSCP”.

However, when clients try to bind (bear in mind they only know the CSCP interface), they get an exception saying they cannot find the class ISCP – but they should have NO need for it.

So, how do have one object (Server) present two different RMI interfaces on two different rmibindings, keeping them separate?

You’re a genius if you can solve this one for me 😀 If I wasn’t clear enough let me know!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:51:30+00:00Added an answer on May 13, 2026 at 10:51 am

    I suggest write two adapter classes, once which implements ICSP, and one which implements CSCP. Each method in these adapter classes calls the appropriate method in the “real” object.

    You then bind each of these adapter classes to RMI, under a different name, instead of binding the original object. Clients can retrieve whichever bound object they want, according to which interface they have.

    Even if there only one interface, this would be good practise anyway, since it’s usually a good idea to decouple your business objects from the remote transport mechanism they communicate with (RMI in this case). Having to export two remote interfaces makes this case even stronger.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys I have one more question lol. I am using a script that
Hey guys I have a bean that comes back and one of the properties
hey guys should be a easy one...I have some javascript that is turning my
Hey guys, here's my requirement: I have one central App which receives requests from
Hey guys i have a question here, How do i create a body that
Hey guys I have my script here that is supposed to do some stuff
Hey guys I have an admin page that checks if you are admin before
Hey guys I have a little issue here. I have a panel where I
Hey guys I have a query that currently finds the latest comment for each
Hey guys, I have developed a small site that i would like to embed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.