start() and disconnects on stop().
If setAutoStartup(boolean) is set to true this will be done
automatically when the Spring ApplicationContext is refreshed.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final Object | |
| protected final Log | |
| private int | |
| private volatile boolean | |
| private final URI |
| Access | Constructor and Description |
|---|---|
| public | ConnectionManagerSupport(String uriTemplate, Object... uriVariables)
Constructor with a URI template and variables. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | |
| public int | getPhase()
Overrides default org. Return the phase in which this endpoint connection factory will be auto-connected and stopped. |
| protected URI | |
| public boolean | isAutoStartup()
Overrides default org. Return the value for the 'autoStartup' property. |
| public abstract boolean | |
| public boolean | isRunning()
Implements org. Return whether this ConnectionManager has been started. |
| protected abstract void | |
| public void | setAutoStartup(boolean autoStartup)
Set whether to auto-connect to the remote endpoint after this connection manager has been initialized and the Spring context has been refreshed. |
| public void | setPhase(int phase)
Specify the phase in which a connection should be established to the remote endpoint and subsequently closed. |
| public final void | |
| protected void | |
| public final void | stop()
Implements org. Stop this component, typically in a synchronous fashion, such that the component is fully stopped upon return of this method. |
| public final void | stop(Runnable callback)
Overrides default org. Indicates that a Lifecycle component must stop if it is currently running. |
| protected void |
| autoStartup | back to summary |
|---|---|
| private boolean autoStartup | |
| lifecycleMonitor | back to summary |
|---|---|
| private final Object lifecycleMonitor | |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| phase | back to summary |
|---|---|
| private int phase | |
| running | back to summary |
|---|---|
| private volatile boolean running | |
| uri | back to summary |
|---|---|
| private final URI uri | |
| ConnectionManagerSupport | back to summary |
|---|---|
| public ConnectionManagerSupport(String uriTemplate, Object... uriVariables) Constructor with a URI template and variables. | |
| ConnectionManagerSupport | back to summary |
|---|---|
| public ConnectionManagerSupport(URI uri) Constructor with a prepared
| |
| closeConnection | back to summary |
|---|---|
| protected abstract void closeConnection() throws Exception Subclasses implement this to close the connection. | |
| getPhase | back to summary |
|---|---|
| public int getPhase() Overrides default org. Return the phase in which this endpoint connection factory will be auto-connected and stopped.
| |
| getUri | back to summary |
|---|---|
| protected URI getUri() | |
| isAutoStartup | back to summary |
|---|---|
| public boolean isAutoStartup() Overrides default org. Return the value for the 'autoStartup' property. If "true", this endpoint connection manager will connect to the remote endpoint upon a ContextRefreshedEvent.
| |
| isConnected | back to summary |
|---|---|
| public abstract boolean isConnected() Whether the connection is open/ | |
| isRunning | back to summary |
|---|---|
| public boolean isRunning() Implements org. Return whether this ConnectionManager has been started.
| |
| openConnection | back to summary |
|---|---|
| protected abstract void openConnection() Subclasses implement this to actually establish the connection. | |
| setAutoStartup | back to summary |
|---|---|
| public void setAutoStartup(boolean autoStartup) Set whether to auto-connect to the remote endpoint after this connection manager has been initialized and the Spring context has been refreshed. Default is "false". | |
| setPhase | back to summary |
|---|---|
| public void setPhase(int phase) Specify the phase in which a connection should be established to the remote endpoint and subsequently closed. The startup order proceeds from lowest to highest, and the shutdown order is the reverse of that. By default, this value is Integer.MAX_VALUE meaning that this endpoint connection factory connects as late as possible and is closed as soon as possible. | |
| start | back to summary |
|---|---|
| public final void start() Implements org. Start the WebSocket connection. If already connected, the method has no impact.
| |
| startInternal | back to summary |
|---|---|
| protected void startInternal() | |
| stop | back to summary |
|---|---|
| public final void stop() Implements org. Doc from org. Stop this component, typically in a synchronous fashion, such that the component is
fully stopped upon return of this method. Consider implementing Note that this stop notification is not guaranteed to come before destruction:
On regular shutdown, Should not throw an exception if the component is not running (not started yet). In the case of a container, this will propagate the stop signal to all components that apply.
| |
| stop | back to summary |
|---|---|
| public final void stop(Runnable callback) Overrides default org. Doc from org. Indicates that a Lifecycle component must stop if it is currently running. The provided callback is used by the The The default implementation delegates to
| |
| stopInternal | back to summary |
|---|---|
| protected void stopInternal() throws Exception | |