Package com.fifa.connectservicebus.sdk
Interface FifaConnectServiceBusClient
-
- All Known Implementing Classes:
FifaConnectServiceBusClientImpl
public interface FifaConnectServiceBusClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(String messageId, String lockToken)Deletes a previously locked message (see peekLock method).booleangetUseEncryption()Gets encryption flagMessagepeekLock()Gets and locks a message without deleting it from the queue.MessagepeekLock(int timeout)Gets and locks a message without deleting it from the queue.voidsend(String recipient, byte[] content)Sends a message to a specified recipient via Message Bus.voidsend(String recipient, byte[] content, String action, Map<String,String> properties)Sends a message to a specified recipient via Message Bus.voidsetUseEncryption(boolean value)Sets encryption flag.voidunlock(String messageId, String lockToken)Unlocks a previously locked message.
-
-
-
Method Detail
-
setUseEncryption
void setUseEncryption(boolean value)
Sets encryption flag.- Parameters:
value-
-
getUseEncryption
boolean getUseEncryption()
Gets encryption flag- Returns:
- boolean
-
send
void send(String recipient, byte[] content, String action, Map<String,String> properties) throws FifaConnectServiceBusException, AuthenticationException, UnauthorizedException, PublicCertificateNotFoundException, CryptographyException, QueueNotFoundException, TooManyRequestsException
Sends a message to a specified recipient via Message Bus.- Parameters:
recipient- Recipient, usually MA to receive the message.content- Message body.action- Name of the actions.properties- Additional properties of the message.- Throws:
FifaConnectServiceBusExceptionAuthenticationExceptionUnauthorizedExceptionPublicCertificateNotFoundExceptionCryptographyExceptionQueueNotFoundExceptionTooManyRequestsException
-
send
void send(String recipient, byte[] content) throws FifaConnectServiceBusException, AuthenticationException, UnauthorizedException, PublicCertificateNotFoundException, CryptographyException, QueueNotFoundException, TooManyRequestsException
Sends a message to a specified recipient via Message Bus.- Parameters:
recipient- Recipient, usually MA to receive the message.content- Message body.- Throws:
FifaConnectServiceBusExceptionAuthenticationExceptionUnauthorizedExceptionPublicCertificateNotFoundExceptionCryptographyExceptionQueueNotFoundExceptionTooManyRequestsException
-
peekLock
Message peekLock(int timeout) throws FifaConnectServiceBusException, AuthenticationException, UnauthorizedException, CryptographyException, QueueNotFoundException, TooManyRequestsException
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.- Parameters:
timeout- Defines how long a request waits before returning that there is no message in the queue.- Throws:
FifaConnectServiceBusExceptionAuthenticationExceptionUnauthorizedExceptionCryptographyExceptionQueueNotFoundExceptionQueueNotFoundExceptionTooManyRequestsException
-
peekLock
Message peekLock() throws FifaConnectServiceBusException, AuthenticationException, UnauthorizedException, CryptographyException, QueueNotFoundException, TooManyRequestsException
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.
-
delete
void delete(String messageId, String lockToken) throws FifaConnectServiceBusException, AuthenticationException, UnauthorizedException, TooManyRequestsException
Deletes a previously locked message (see peekLock method).- Parameters:
messageId- Message id retrieved from peekLock method.lockToken- Lock token id retrieved from peekLock method.- Throws:
FifaConnectServiceBusExceptionAuthenticationExceptionUnauthorizedExceptionTooManyRequestsException
-
unlock
void unlock(String messageId, String lockToken) throws FifaConnectServiceBusException, AuthenticationException, UnauthorizedException, TooManyRequestsException
Unlocks a previously locked message. The message is returned to the queue and can be fetched using peekLock or receive method.- Parameters:
messageId- Message id retrieved from peekLock method.lockToken- Lock token id retrieved from peekLock method.- Throws:
FifaConnectServiceBusExceptionAuthenticationExceptionUnauthorizedExceptionTooManyRequestsException
-
-