-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 引擎等MQ场景接入SCS框架 #7443 接入websocket和auth服务
- Loading branch information
royalhuang
committed
Oct 14, 2022
1 parent
e5a6a6b
commit 751d9a4
Showing
2 changed files
with
14 additions
and
29 deletions.
There are no files selected for viewing
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
17 changes: 2 additions & 15 deletions
17
...mmon-stream/src/main/kotlin/com/tencent/devops/common/stream/utils/DefaultBindingUtils.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 |
---|---|---|
@@ -1,25 +1,12 @@ | ||
package com.tencent.devops.common.stream.utils | ||
|
||
import com.tencent.devops.common.api.util.UUIDUtil | ||
import java.lang.reflect.Method | ||
|
||
object DefaultBindingUtils { | ||
|
||
fun getOutBindingName(clazz: Class<*>) = clazz.simpleName.decapitalize() | ||
|
||
fun getInBindingName(method: Method, suffix: String?): String { | ||
return if (suffix.isNullOrBlank()) { | ||
method.name | ||
} else { | ||
"${method.name}-$suffix" | ||
} | ||
} | ||
fun getInBindingName(method: Method): String = method.name | ||
|
||
fun getInBindingName(clazz: Class<*>, suffix: String?): String { | ||
return if (suffix.isNullOrBlank()) { | ||
clazz.simpleName.decapitalize() | ||
} else { | ||
"${clazz.simpleName.decapitalize()}-$suffix" | ||
} | ||
} | ||
fun getInBindingName(clazz: Class<*>) = clazz.simpleName.decapitalize() | ||
} |