public abstract class AbstractContract extends Object implements Contract
| Modifier and Type | Field and Description |
|---|---|
protected Set<Binding> |
bindings
associated binding
|
protected InterfaceMode |
interfaceMode
interface mode
|
protected Class<?> |
interfaceType
interface class type
|
protected Map<String,String> |
property
properties of contract
|
protected String |
uniqueId
unique id
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractContract(String uniqueId,
Class<?> interfaceType) |
protected |
AbstractContract(String uniqueId,
Class<?> interfaceType,
InterfaceMode interfaceMode) |
protected |
AbstractContract(String uniqueId,
Class<?> interfaceType,
InterfaceMode interfaceMode,
Map<String,String> property) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Binding> |
addBinding(Set<T> bindings)
add binding object, Contract supports multiple binding
|
<T extends Binding> |
addBinding(T binding)
add binding object, Contract supports multiple binding
|
Binding |
getBinding(BindingType bindingType)
get binding object by binding type
|
Set<Binding> |
getBindings()
get supported binding set
|
InterfaceMode |
getInterfaceMode()
get interface mode
|
Class<?> |
getInterfaceType()
get interface type
|
Map<String,String> |
getProperty()
get all properties
|
String |
getProperty(String key)
get property
|
String |
getUniqueId()
get unique id, to support distribute service from same interface
|
boolean |
hasBinding()
has binding or not
|
protected String uniqueId
protected Class<?> interfaceType
protected InterfaceMode interfaceMode
protected AbstractContract(String uniqueId, Class<?> interfaceType, InterfaceMode interfaceMode)
public <T extends Binding> void addBinding(T binding)
ContractaddBinding in interface Contractbinding - binding objectpublic <T extends Binding> void addBinding(Set<T> bindings)
ContractaddBinding in interface Contractbindings - binding objectspublic Binding getBinding(BindingType bindingType)
ContractgetBinding in interface ContractbindingType - binding typepublic Set<Binding> getBindings()
ContractgetBindings in interface Contractpublic boolean hasBinding()
ContracthasBinding in interface Contractpublic String getUniqueId()
ContractgetUniqueId in interface Contractpublic InterfaceMode getInterfaceMode()
ContractgetInterfaceMode in interface Contractpublic Class<?> getInterfaceType()
ContractgetInterfaceType in interface Contractpublic String getProperty(String key)
ContractgetProperty in interface Contractkey - property keyCopyright © 2021. All rights reserved.