Package sfs3.client.entities.invitation
Class SFSInvitation
java.lang.Object
sfs3.client.entities.invitation.SFSInvitation
- All Implemented Interfaces:
Invitation
The SFSInvitation object contains all the informations about an invitation received by the current user.
An invitation is sent through the InviteUsersRequest request and it is received as an invitation event. Clients can reply to an invitation using the InvitationReplyRequest request.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected Userprotected Userprotected ISFSObjectprotected int -
Constructor Summary
ConstructorsConstructorDescriptionSFSInvitation(User inviter, User invitee) SFSInvitation(User inviter, User invitee, int secondsForAnswer) SFSInvitation(User inviter, User invitee, int secondsForAnswer, ISFSObject parameters) Creates a new SFSInvitation instance. -
Method Summary
Modifier and TypeMethodDescriptionintgetId()Indicates the id of this invitation.Returns the User object corresponding to the user who received the invitation.Returns the User object corresponding to the user who sent the invitation.Returns an instance of SFSObject containing a custom set of parameters.intReturns the number of seconds available to the invitee to reply to the invitation, after which the invitation expires.voidsetId(int id) toString()
-
Field Details
-
id
protected int id -
inviter
-
invitee
-
secondsForAnswer
protected int secondsForAnswer -
parameters
-
-
Constructor Details
-
SFSInvitation
Creates a new SFSInvitation instance.NOTE: developers never instantiate an SFSInvitation manually: this is done by the SmartFoxServer 3 API internally. A reference to an existing instance is always provided by the invitation event.
- Parameters:
inviter- A User object corresponding to the user who sent the invitation.invitee- A User object corresponding to the user who received the invitation.secondsForAnswer- The number of seconds available to the invitee to reply to the invitation.parameters- An instance of SFSObject containing a custom set of parameters representing the invitation details.- See Also:
-
SFSInvitation
-
SFSInvitation
-
-
Method Details
-
getId
public int getId()Description copied from interface:InvitationIndicates the id of this invitation. It is generated by the server when the invitation is sent.NOTE: setting the id property manually has no effect on the server and can disrupt the API functioning.
- Specified by:
getIdin interfaceInvitation
-
setId
public void setId(int id) - Specified by:
setIdin interfaceInvitation- Internal
-
getInviter
Description copied from interface:InvitationReturns the User object corresponding to the user who sent the invitation.- Specified by:
getInviterin interfaceInvitation
-
getInvitee
Description copied from interface:InvitationReturns the User object corresponding to the user who received the invitation.- Specified by:
getInviteein interfaceInvitation
-
getSecondsForAnswer
public int getSecondsForAnswer()Description copied from interface:InvitationReturns the number of seconds available to the invitee to reply to the invitation, after which the invitation expires.- Specified by:
getSecondsForAnswerin interfaceInvitation
-
getParams
Description copied from interface:InvitationReturns an instance of SFSObject containing a custom set of parameters. It usually stores invitation details, like a message to the invitee and any other relevant data.- Specified by:
getParamsin interfaceInvitation
-
toString
-