Class MessagesImpl

  • All Implemented Interfaces:
    Messages

    public class MessagesImpl
    extends Object
    implements Messages
    An instance of this class provides access to all the operations defined in Messages.
    • Constructor Detail

      • MessagesImpl

        public MessagesImpl​(retrofit2.Retrofit retrofit,
                            FIFAConnectServiceBusV3Impl client)
        Initializes an instance of Messages.
        Parameters:
        retrofit - the Retrofit instance built from a Retrofit Builder.
        client - the instance of the service client containing this operation class.
    • Method Detail

      • sendByRecipientAndActionAndProperties

        public Object sendByRecipientAndActionAndProperties​(String recipient,
                                                            byte[] body)
        Sends a message to a specified recipient via Message Bus.
        Specified by:
        sendByRecipientAndActionAndProperties in interface Messages
        Parameters:
        recipient - Recipient, usually MA to receive the message.
        body - Message body
        Returns:
        the Object object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        com.microsoft.rest.RestException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • sendByRecipientAndActionAndPropertiesAsync

        public com.microsoft.rest.ServiceFuture<Object> sendByRecipientAndActionAndPropertiesAsync​(String recipient,
                                                                                                   byte[] body,
                                                                                                   com.microsoft.rest.ServiceCallback<Object> serviceCallback)
        Sends a message to a specified recipient via Message Bus.
        Specified by:
        sendByRecipientAndActionAndPropertiesAsync in interface Messages
        Parameters:
        recipient - Recipient, usually MA to receive the message.
        body - Message body
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • sendByRecipientAndActionAndPropertiesAsync

        public rx.Observable<Object> sendByRecipientAndActionAndPropertiesAsync​(String recipient,
                                                                                byte[] body)
        Sends a message to a specified recipient via Message Bus.
        Specified by:
        sendByRecipientAndActionAndPropertiesAsync in interface Messages
        Parameters:
        recipient - Recipient, usually MA to receive the message.
        body - Message body
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • sendByRecipientAndActionAndPropertiesWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<Object>> sendByRecipientAndActionAndPropertiesWithServiceResponseAsync​(String recipient,
                                                                                                                                       byte[] body)
        Sends a message to a specified recipient via Message Bus.
        Specified by:
        sendByRecipientAndActionAndPropertiesWithServiceResponseAsync in interface Messages
        Parameters:
        recipient - Recipient, usually MA to receive the message.
        body - Message body
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • sendByRecipientAndActionAndProperties

        public Object sendByRecipientAndActionAndProperties​(String recipient,
                                                            byte[] body,
                                                            String xAction,
                                                            String xProperties)
        Sends a message to a specified recipient via Message Bus.
        Specified by:
        sendByRecipientAndActionAndProperties in interface Messages
        Parameters:
        recipient - Recipient, usually MA to receive the message.
        body - Message body
        xAction - Name of the action represented by the message. Optional parameter
        xProperties - Unencrypted properties of the message. Optional parameter
        Returns:
        the Object object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        com.microsoft.rest.RestException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • sendByRecipientAndActionAndPropertiesAsync

        public com.microsoft.rest.ServiceFuture<Object> sendByRecipientAndActionAndPropertiesAsync​(String recipient,
                                                                                                   byte[] body,
                                                                                                   String xAction,
                                                                                                   String xProperties,
                                                                                                   com.microsoft.rest.ServiceCallback<Object> serviceCallback)
        Sends a message to a specified recipient via Message Bus.
        Specified by:
        sendByRecipientAndActionAndPropertiesAsync in interface Messages
        Parameters:
        recipient - Recipient, usually MA to receive the message.
        body - Message body
        xAction - Name of the action represented by the message. Optional parameter
        xProperties - Unencrypted properties of the message. Optional parameter
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • sendByRecipientAndActionAndPropertiesAsync

        public rx.Observable<Object> sendByRecipientAndActionAndPropertiesAsync​(String recipient,
                                                                                byte[] body,
                                                                                String xAction,
                                                                                String xProperties)
        Sends a message to a specified recipient via Message Bus.
        Specified by:
        sendByRecipientAndActionAndPropertiesAsync in interface Messages
        Parameters:
        recipient - Recipient, usually MA to receive the message.
        body - Message body
        xAction - Name of the action represented by the message. Optional parameter
        xProperties - Unencrypted properties of the message. Optional parameter
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • sendByRecipientAndActionAndPropertiesWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<Object>> sendByRecipientAndActionAndPropertiesWithServiceResponseAsync​(String recipient,
                                                                                                                                       byte[] body,
                                                                                                                                       String xAction,
                                                                                                                                       String xProperties)
        Sends a message to a specified recipient via Message Bus.
        Specified by:
        sendByRecipientAndActionAndPropertiesWithServiceResponseAsync in interface Messages
        Parameters:
        recipient - Recipient, usually MA to receive the message.
        body - Message body
        xAction - Name of the action represented by the message. Optional parameter
        xProperties - Unencrypted properties of the message. Optional parameter
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • receiveByRequest

        public Object receiveByRequest()
        Gets a message from the Message Bus. Message is deleted from the queue.
        Specified by:
        receiveByRequest in interface Messages
        Returns:
        the Object object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        com.microsoft.rest.RestException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • receiveByRequestAsync

        public com.microsoft.rest.ServiceFuture<Object> receiveByRequestAsync​(com.microsoft.rest.ServiceCallback<Object> serviceCallback)
        Gets a message from the Message Bus. Message is deleted from the queue.
        Specified by:
        receiveByRequestAsync in interface Messages
        Parameters:
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • receiveByRequestAsync

        public rx.Observable<Object> receiveByRequestAsync()
        Gets a message from the Message Bus. Message is deleted from the queue.
        Specified by:
        receiveByRequestAsync in interface Messages
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • receiveByRequest

        public Object receiveByRequest​(Integer timeout)
        Gets a message from the Message Bus. Message is deleted from the queue.
        Specified by:
        receiveByRequest in interface Messages
        Parameters:
        timeout - The system will wait N number of seconds before returning "no messages available" message.
        Returns:
        the Object object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        com.microsoft.rest.RestException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • receiveByRequestAsync

        public com.microsoft.rest.ServiceFuture<Object> receiveByRequestAsync​(Integer timeout,
                                                                              com.microsoft.rest.ServiceCallback<Object> serviceCallback)
        Gets a message from the Message Bus. Message is deleted from the queue.
        Specified by:
        receiveByRequestAsync in interface Messages
        Parameters:
        timeout - The system will wait N number of seconds before returning "no messages available" message.
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • receiveByRequestAsync

        public rx.Observable<Object> receiveByRequestAsync​(Integer timeout)
        Gets a message from the Message Bus. Message is deleted from the queue.
        Specified by:
        receiveByRequestAsync in interface Messages
        Parameters:
        timeout - The system will wait N number of seconds before returning "no messages available" message.
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • receiveByRequestWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Object,​MessageReceiveByRequestHeaders>> receiveByRequestWithServiceResponseAsync​(Integer timeout)
        Gets a message from the Message Bus. Message is deleted from the queue.
        Specified by:
        receiveByRequestWithServiceResponseAsync in interface Messages
        Parameters:
        timeout - The system will wait N number of seconds before returning "no messages available" message.
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • peekLockByRequest

        public Object peekLockByRequest()
        Gets and locks a message without deleting it from the queue. If message is not deleted within configured time it's automatically unlocked and visible for other recipients.
        Specified by:
        peekLockByRequest in interface Messages
        Returns:
        the Object object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        com.microsoft.rest.RestException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • peekLockByRequestAsync

        public com.microsoft.rest.ServiceFuture<Object> peekLockByRequestAsync​(com.microsoft.rest.ServiceCallback<Object> serviceCallback)
        Gets and locks a message without deleting it from the queue. If message is not deleted within configured time it's automatically unlocked and visible for other recipients.
        Specified by:
        peekLockByRequestAsync in interface Messages
        Parameters:
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • peekLockByRequestAsync

        public rx.Observable<Object> peekLockByRequestAsync()
        Gets and locks a message without deleting it from the queue. If message is not deleted within configured time it's automatically unlocked and visible for other recipients.
        Specified by:
        peekLockByRequestAsync in interface Messages
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • peekLockByRequestWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Object,​MessagePeekLockByRequestHeaders>> peekLockByRequestWithServiceResponseAsync()
        Gets and locks a message without deleting it from the queue. If message is not deleted within configured time it's automatically unlocked and visible for other recipients.
        Specified by:
        peekLockByRequestWithServiceResponseAsync in interface Messages
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • peekLockByRequest

        public Object peekLockByRequest​(Integer timeout)
        Gets and locks a message without deleting it from the queue. If message is not deleted within configured time it's automatically unlocked and visible for other recipients.
        Specified by:
        peekLockByRequest in interface Messages
        Parameters:
        timeout - The system will wait N number of seconds before returning "no messages available" message.
        Returns:
        the Object object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        com.microsoft.rest.RestException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • peekLockByRequestAsync

        public com.microsoft.rest.ServiceFuture<Object> peekLockByRequestAsync​(Integer timeout,
                                                                               com.microsoft.rest.ServiceCallback<Object> serviceCallback)
        Gets and locks a message without deleting it from the queue. If message is not deleted within configured time it's automatically unlocked and visible for other recipients.
        Specified by:
        peekLockByRequestAsync in interface Messages
        Parameters:
        timeout - The system will wait N number of seconds before returning "no messages available" message.
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • peekLockByRequestAsync

        public rx.Observable<Object> peekLockByRequestAsync​(Integer timeout)
        Gets and locks a message without deleting it from the queue. If message is not deleted within configured time it's automatically unlocked and visible for other recipients.
        Specified by:
        peekLockByRequestAsync in interface Messages
        Parameters:
        timeout - The system will wait N number of seconds before returning "no messages available" message.
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • peekLockByRequestWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Object,​MessagePeekLockByRequestHeaders>> peekLockByRequestWithServiceResponseAsync​(Integer timeout)
        Gets and locks a message without deleting it from the queue. If message is not deleted within configured time it's automatically unlocked and visible for other recipients.
        Specified by:
        peekLockByRequestWithServiceResponseAsync in interface Messages
        Parameters:
        timeout - The system will wait N number of seconds before returning "no messages available" message.
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • deleteByRequest

        public Object deleteByRequest​(String messageId,
                                      String lockToken)
        Deletes a previously locked message (see PeekLock method).
        Specified by:
        deleteByRequest in interface Messages
        Parameters:
        messageId - Message identifier returned by a previously called "peeklock" method.
        lockToken - Lock token, returned by a previously called "peeklock" method.
        Returns:
        the Object object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        com.microsoft.rest.RestException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • deleteByRequestAsync

        public com.microsoft.rest.ServiceFuture<Object> deleteByRequestAsync​(String messageId,
                                                                             String lockToken,
                                                                             com.microsoft.rest.ServiceCallback<Object> serviceCallback)
        Deletes a previously locked message (see PeekLock method).
        Specified by:
        deleteByRequestAsync in interface Messages
        Parameters:
        messageId - Message identifier returned by a previously called "peeklock" method.
        lockToken - Lock token, returned by a previously called "peeklock" method.
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • deleteByRequestAsync

        public rx.Observable<Object> deleteByRequestAsync​(String messageId,
                                                          String lockToken)
        Deletes a previously locked message (see PeekLock method).
        Specified by:
        deleteByRequestAsync in interface Messages
        Parameters:
        messageId - Message identifier returned by a previously called "peeklock" method.
        lockToken - Lock token, returned by a previously called "peeklock" method.
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • deleteByRequestWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<Object>> deleteByRequestWithServiceResponseAsync​(String messageId,
                                                                                                                 String lockToken)
        Deletes a previously locked message (see PeekLock method).
        Specified by:
        deleteByRequestWithServiceResponseAsync in interface Messages
        Parameters:
        messageId - Message identifier returned by a previously called "peeklock" method.
        lockToken - Lock token, returned by a previously called "peeklock" method.
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • unlockByRequest

        public Object unlockByRequest​(String messageId,
                                      String lockToken)
        Unlocks a previously locked message. The message is returned to the queue and can be fetched using PeekLock method.
        Specified by:
        unlockByRequest in interface Messages
        Parameters:
        messageId - Message identifier returned by a previously called "peeklock" method.
        lockToken - Lock token, returned by a previously called "peeklock" method.
        Returns:
        the Object object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        com.microsoft.rest.RestException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • unlockByRequestAsync

        public com.microsoft.rest.ServiceFuture<Object> unlockByRequestAsync​(String messageId,
                                                                             String lockToken,
                                                                             com.microsoft.rest.ServiceCallback<Object> serviceCallback)
        Unlocks a previously locked message. The message is returned to the queue and can be fetched using PeekLock method.
        Specified by:
        unlockByRequestAsync in interface Messages
        Parameters:
        messageId - Message identifier returned by a previously called "peeklock" method.
        lockToken - Lock token, returned by a previously called "peeklock" method.
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • unlockByRequestAsync

        public rx.Observable<Object> unlockByRequestAsync​(String messageId,
                                                          String lockToken)
        Unlocks a previously locked message. The message is returned to the queue and can be fetched using PeekLock method.
        Specified by:
        unlockByRequestAsync in interface Messages
        Parameters:
        messageId - Message identifier returned by a previously called "peeklock" method.
        lockToken - Lock token, returned by a previously called "peeklock" method.
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • unlockByRequestWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<Object>> unlockByRequestWithServiceResponseAsync​(String messageId,
                                                                                                                 String lockToken)
        Unlocks a previously locked message. The message is returned to the queue and can be fetched using PeekLock method.
        Specified by:
        unlockByRequestWithServiceResponseAsync in interface Messages
        Parameters:
        messageId - Message identifier returned by a previously called "peeklock" method.
        lockToken - Lock token, returned by a previously called "peeklock" method.
        Returns:
        the observable to the Object object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation