org.springframework.yarn.integration
Class IntegrationAppmasterServiceClient<T>

java.lang.Object
  extended by org.springframework.yarn.support.LifecycleObjectSupport
      extended by org.springframework.yarn.integration.support.IntegrationObjectSupport
          extended by org.springframework.yarn.integration.IntegrationAppmasterServiceClient<T>
All Implemented Interfaces:
Aware, BeanFactoryAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, org.springframework.yarn.am.AppmasterServiceClient, org.springframework.yarn.client.AppmasterScOperations
Direct Known Subclasses:
MindAppmasterServiceClient

public abstract class IntegrationAppmasterServiceClient<T>
extends IntegrationObjectSupport
implements org.springframework.yarn.client.AppmasterScOperations, org.springframework.yarn.am.AppmasterServiceClient

Implementation of Appmaster service client working on top of Spring Int tcp channels.

Author:
Janne Valkealahti

Constructor Summary
IntegrationAppmasterServiceClient()
           
 
Method Summary
 org.springframework.yarn.am.RpcMessage<?> get(org.springframework.yarn.am.RpcMessage<?> message)
           
protected abstract  T getPayload(org.springframework.yarn.am.RpcMessage<?> message)
          This method is called from get(RpcMessage) to resolve the actual payload sent to Sprint Int Tcp channel.
 void setRequestChannel(MessageChannel requestChannel)
          Set the request channel for outgoing messages.
 void setResponseChannel(PollableChannel responseChannel)
          Set the response channel for incoming messages.
 
Methods inherited from class org.springframework.yarn.integration.support.IntegrationObjectSupport
getConversionService, setConversionService
 
Methods inherited from class org.springframework.yarn.support.LifecycleObjectSupport
afterPropertiesSet, doStart, doStop, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegrationAppmasterServiceClient

public IntegrationAppmasterServiceClient()
Method Detail

setRequestChannel

public void setRequestChannel(MessageChannel requestChannel)
Set the request channel for outgoing messages.

Parameters:
requestChannel - the request channel

setResponseChannel

public void setResponseChannel(PollableChannel responseChannel)
Set the response channel for incoming messages.

Parameters:
responseChannel - the response channel

get

public org.springframework.yarn.am.RpcMessage<?> get(org.springframework.yarn.am.RpcMessage<?> message)
Specified by:
get in interface org.springframework.yarn.client.AppmasterScOperations

getPayload

protected abstract T getPayload(org.springframework.yarn.am.RpcMessage<?> message)
This method is called from get(RpcMessage) to resolve the actual payload sent to Sprint Int Tcp channel. In this class we don't care what the payload content is, thus implementor is responsible to define it.

Parameters:
message - the rpc message
Returns:
the payload