Interface IChatGuiService


  • public interface IChatGuiService
    Service for connecting a user interface to a running chat service.
    • Method Detail

      • setNickName

        IFuture<java.lang.Void> setNickName​(java.lang.String nick)
        Set the user name.
      • getNickName

        IFuture<java.lang.String> getNickName()
        Get the user name.
      • setImage

        IFuture<java.lang.Void> setImage​(byte[] image)
        Set the avatar image.
      • getImage

        IFuture<byte[]> getImage()
        Get the avatar image.
      • message

        IIntermediateFuture<IChatService> message​(java.lang.String text,
                                                  IComponentIdentifier[] receivers,
                                                  boolean self)
        Post a message. Searches for available chat services and posts the message to all.
        Parameters:
        text - The text message.
        receivers - The receivers the message should be sent to.
        self - Flag if message should also be sent to service itself.
        Returns:
        The remote services, to which the message was successfully posted.
      • status

        IIntermediateFuture<IChatService> status​(java.lang.String status,
                                                 byte[] image,
                                                 IComponentIdentifier[] receivers)
        Post a status change.
        Parameters:
        status - The new status or null for no change.
        image - The new avatar image or null for no change.
        receivers - The receivers.
      • sendFile

        IFuture<java.lang.Void> sendFile​(java.lang.String filename,
                                         IComponentIdentifier cid)
        Send a local file to the target component.
        Parameters:
        filename - The file name.
        cid - The id of a remote chat component.
      • sendFile

        IFuture<java.lang.Void> sendFile​(java.lang.String fname,
                                         byte[] data,
                                         IComponentIdentifier cid)
        Send a file to the target component via bytes.
        Parameters:
        filepath - The file path, local to the chat component.
        cid - The id of a remote chat component.
      • acceptFile

        IFuture<java.lang.Void> acceptFile​(java.lang.String id,
                                           java.lang.String filename)
        Accept a waiting file transfer.
        Parameters:
        id - The transfer id.
        filename - The location of the file (possibly changed by user).
      • rejectFile

        IFuture<java.lang.Void> rejectFile​(java.lang.String id)
        Reject a waiting file transfer.
        Parameters:
        id - The transfer id.
      • cancelTransfer

        IFuture<java.lang.Void> cancelTransfer​(java.lang.String id)
        Cancel an ongoing file transfer.
        Parameters:
        id - The transfer id.