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)
|
String |
getState() |
boolean |
isPausable() |
boolean |
isRunning()
Returns 'true' if the target component represented by this instance is running.
|
void |
pause()
Pauses the target component represented by this instance if and only if the component
implements
Pausable interface
NOTE: At the time the instance is created the component is already started and active. |
void |
resume()
Resumes the target component represented by this instance if and only if the component
implements
Pausable interface
NOTE: At the time the instance is created the component is already started and active. |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getExtendedInfo
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()
Binding
public String getGroup()
public String getState()
public boolean isRunning()
Binding
public boolean isPausable()
public final void start()
Binding
start
in interface Binding<T>
start
in interface org.springframework.context.Lifecycle
BindingsEndpoint
public final void stop()
Binding
stop
in interface Binding<T>
stop
in interface org.springframework.context.Lifecycle
BindingsEndpoint
public final void pause()
Binding
Pausable
interface
NOTE: At the time the instance is created the component is already started and active.
This operation is typically used by actuator to pause/resume.pause
in interface Binding<T>
pause
in interface org.springframework.integration.endpoint.Pausable
BindingsEndpoint
public final void resume()
Binding
Pausable
interface
NOTE: At the time the instance is created the component is already started and active.
This operation is typically used by actuator to pause/resume.resume
in interface Binding<T>
resume
in interface org.springframework.integration.endpoint.Pausable
BindingsEndpoint
public final void unbind()
Binding
protected void afterUnbind()
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.