I am implementing an application related to RMI and SSL

The task is -

Implement client,communication link and server

Client wants to use resource from server but doesnt know who is server. All communication happens through communication link.

communication link knows where is server. when client requests resource communication link validates client based on certificates and then requests a resource from server if client is valid.

My thinking is communication link is nothing but an interface which implements Remote interface from java.rmi package

But i am a bit confused how communication link will check for the validity of client using certificates?

Can anyone help?