public abstract class IntegrationAppmasterService<T> extends IntegrationObjectSupport implements AppmasterService
AppmasterService
using Spring Integration Ip
channels as a communication link.Constructor and Description |
---|
IntegrationAppmasterService() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart()
Subclasses may implement this method with the start behavior.
|
protected void |
doStop()
Subclasses may implement this method with the stop behavior.
|
java.lang.String |
getHost()
Get a hostname where service is running.
|
int |
getPort()
Get a port where service is running.
|
abstract RpcMessage<T> |
handleMessageInternal(RpcMessage<T> message)
Implementor need to write this method to process
incoming messages.
|
boolean |
hasPort()
This method should return true if a service
will eventually bind to a port.
|
void |
setMessageChannel(org.springframework.messaging.SubscribableChannel messageChannel)
Sets the message channel where messages are dispatched.
|
void |
setSocketSupport(PortExposingTcpSocketSupport socketSupport)
Sets the socket support for this service.
|
getConversionService, setConversionService
afterPropertiesSet, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop
protected void doStart()
LifecycleObjectSupport
LifecycleObjectSupport.lifecycleLock
.doStart
in class LifecycleObjectSupport
protected void doStop()
LifecycleObjectSupport
LifecycleObjectSupport.lifecycleLock
.doStop
in class LifecycleObjectSupport
public int getPort()
AppmasterService
getPort
in interface AppmasterService
public java.lang.String getHost()
AppmasterService
getHost
in interface AppmasterService
public boolean hasPort()
AppmasterService
AppmasterService.getPort()
to
return the actual port number.hasPort
in interface AppmasterService
public abstract RpcMessage<T> handleMessageInternal(RpcMessage<T> message)
message
- the rpc message wrapping a protocol contentpublic void setMessageChannel(org.springframework.messaging.SubscribableChannel messageChannel)
messageChannel
- the message channelpublic void setSocketSupport(PortExposingTcpSocketSupport socketSupport)
socketSupport
- the socket support