Reputation: 487
Is there a way to write a Web program when you would deliberately specify which classes are allowed to invoke this or that method? I am writing Web app in Java and using Spring Web MVC. If it is possible please tell me about the methods or technologies being used for that. Best regards
Upvotes: 0
Views: 51
Reputation: 4047
You might want to look up http://download.oracle.com/javase/1.4.2/docs/api/java/lang/SecurityManager.html documentation.
Upvotes: 0
Reputation: 8201
That should be a design decision if your are building a framework of some kind, so use what language gives you, like access modifiers (private, public and such...).
Even restricting access like this, you can still have code call your methods using reflection, so there is no safe-guard if that's what you want (but "safeguarding" anything like this makes no sense anyway, so... )
Can you describe what are you exactly trying to do?
Upvotes: 1