-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add functionality to get individual message sent callbacks via courie…
…r service interface (#68) * Add functionality to get individual message sent callbacks via courier service interface
- Loading branch information
1 parent
1ae8021
commit 1c9ce1c
Showing
18 changed files
with
159 additions
and
20 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
app/src/main/java/com/gojek/courier/app/data/network/CourierService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
courier-core/src/main/java/com/gojek/courier/callback/NoOpSendMessageCallback.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.gojek.courier.callback | ||
|
||
object NoOpSendMessageCallback : SendMessageCallback { | ||
override fun onMessageSendTrigger() { | ||
// no-op | ||
} | ||
|
||
override fun onMessageWrittenOnSocket() { | ||
// no-op | ||
} | ||
|
||
override fun onMessageSendSuccess() { | ||
// no-op | ||
} | ||
|
||
override fun onMessageSendFailure(error: Throwable) { | ||
// no-op | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
courier-core/src/main/java/com/gojek/courier/callback/SendMessageCallback.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.gojek.courier.callback | ||
|
||
interface SendMessageCallback { | ||
fun onMessageSendTrigger() | ||
fun onMessageWrittenOnSocket() | ||
fun onMessageSendSuccess() | ||
fun onMessageSendFailure(error: Throwable) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
courier/src/main/java/com/gojek/courier/annotation/Callback.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.gojek.courier.annotation | ||
|
||
@MustBeDocumented | ||
@Target(AnnotationTarget.VALUE_PARAMETER) | ||
@kotlin.annotation.Retention(AnnotationRetention.RUNTIME) | ||
annotation class Callback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.