Interface Invitation

  • All Known Implementing Classes:
    SFSInvitation

    public interface Invitation
    Represents an Invitation object
    • Method Detail

      • getId

        int getId()
        Get the unique invitation ID
        Returns:
        the id
      • getInviter

        User getInviter()
        Get the Inviter, the user that started this invitation
        Returns:
        the inviter
      • getInvitee

        User getInvitee()
        Get the Invitee, the user that receives the invitation
        Returns:
        the invitee
      • isExpired

        boolean isExpired()
        Checks if the invitation is expired.
        Returns:
        true if the invitation is expired
      • getExpiryTime

        int getExpiryTime()
        The expiration timestamp.
        Returns:
        expiration timestamp.
      • getSecondsForAnswer

        int getSecondsForAnswer()
        The amount of seconds given to the invitee to respond to the invitation
        Returns:
        the amount of seconds given to the invitee to respond to the invitation
      • setCallback

        void setCallback​(InvitationCallback callback)
        Set the CallBack handler for the invitation. The handler will be invoked by the system when the invited User accepts or refuses the invitation or if the invitation expires.
        Parameters:
        callback - the callback handler
        See Also:
        InvitationCallback
      • getParams

        ISFSObject getParams()
        An SFSObject of custom parameters can be attached to the invitation. It could contain any properties relevant to the invitation, like a message, the game type/settings and any other parameter.
        Returns:
        the custom parameters
        See Also:
        SFSObject
      • setParams

        void setParams​(ISFSObject params)
        An SFSObject of custom parameters can be attached to the invitation. It could contain any properties relevant to the invitation, like a message, the game type/settings and any other parameter.
        Parameters:
        params - the custom parameters
        See Also:
        SFSObject