JeanAlesi
JeanAlesi

Reputation: 598

Extending Remote vs UnicastRemoteObject

What is the difference between extending Remote vs. extending UnicastRemoteObject? When do I want one or the other? Thank you.

Upvotes: 0

Views: 851

Answers (1)

user207421
user207421

Reputation: 310980

This is a false opposition. They are not in competition: you don't have to choose between them:

  1. Your remote interface must extend Remote.

  2. Your remote object must implement your remote interface. It can either extend UnicastRemoteObject or be exported manually by calling UnicastRemoteObject.exportObject().

Upvotes: 4

Related Questions