JBoss.orgCommunity Documentation
Similarly, you can apply the above steps to implement RelationshipListenerPlugin for relationship notifications.
Relationship is the bridge between two identities in Social. There are many types of relationships defined in the Relationship class. With these types, a user can invite another user, confirm invitations or remove relationship.