Interface Invitation
- All Known Implementing Classes:
SFSInvitation
public interface Invitation
Represents an Invitation object
-
Method Summary
Modifier and TypeMethodDescriptionObtain a reference to the CallBack handler classintThe expiration timestamp.intgetId()Get the unique invitation IDGet the Invitee, the user that receives the invitationGet the Inviter, the user that started this invitationAn SFSObject of custom parameters can be attached to the invitation.intThe amount of seconds given to the invitee to respond to the invitationbooleanChecks if the invitation is expired.voidsetCallback(InvitationCallback callback) Set the CallBack handler for the invitation.voidsetParams(ISFSObject params) An SFSObject of custom parameters can be attached to the invitation.
-
Method Details
-
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
-
getCallback
InvitationCallback getCallback()Obtain a reference to the CallBack handler class- Returns:
- the callback handler
- See Also:
-
setCallback
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:
-
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:
-
setParams
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:
-