public class DefaultBinding<T> extends Object implements Binding<T>
Binding.EnableBinding| Modifier and Type | Field and Description |
|---|---|
protected String |
group |
protected org.springframework.context.Lifecycle |
lifecycle |
protected String |
name |
protected T |
target |
| Constructor and Description |
|---|
DefaultBinding(String name,
String group,
T target,
org.springframework.context.Lifecycle lifecycle)
Creates an instance that associates a given name, group and binding target with an
optional
Lifecycle component, which will be stopped during unbinding. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterUnbind()
Listener method that executes after unbinding.
|
String |
getGroup() |
String |
getName()
Returns the name of this binding (i.e., channel name)
|
boolean |
isRunning()
Returns 'true' if the target component represented by this instance is running.
|
void |
start()
Stops the target component represented by this instance.
|
void |
stop()
Starts the target component represented by this instance.
|
String |
toString() |
void |
unbind()
Unbinds the target component represented by this instance and stops any active
components.
|
protected final String name
protected final String group
protected final T target
protected final org.springframework.context.Lifecycle lifecycle
public DefaultBinding(String name, String group, T target, org.springframework.context.Lifecycle lifecycle)
Lifecycle component, which will be stopped during unbinding.name - the name of the binding targetgroup - the group (only for input targets)target - the binding targetlifecycle - Lifecycle that runs while the binding is active and will
be stopped during unbindingpublic String getName()
Bindingpublic String getGroup()
public boolean isRunning()
Bindingpublic final void start()
Bindingpublic final void stop()
Bindingpublic final void unbind()
Bindingprotected void afterUnbind()
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.