Spring for Apache Hadoop

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:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, AppmasterServiceClient, AppmasterScOperations
Direct Known Subclasses:
MindAppmasterServiceClient

public abstract class IntegrationAppmasterServiceClient<T>
extends IntegrationObjectSupport
implements AppmasterScOperations, AppmasterServiceClient

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

Author:
Janne Valkealahti

Constructor Summary
IntegrationAppmasterServiceClient()
           
 
Method Summary
 RpcMessage<?> get(RpcMessage<?> message)
          Sends request wrapped in RpcMessage and receives response similarly wrapped in RpcMessage.
protected abstract  T getPayload(RpcMessage<?> message)
          This method is called from get(RpcMessage) to resolve the actual payload sent to Sprint Int Tcp channel.
 void setRequestChannel(org.springframework.integration.MessageChannel requestChannel)
          Set the request channel for outgoing messages.
 void setResponseChannel(org.springframework.integration.core.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(org.springframework.integration.MessageChannel requestChannel)
Set the request channel for outgoing messages.

Parameters:
requestChannel - the request channel

setResponseChannel

public void setResponseChannel(org.springframework.integration.core.PollableChannel responseChannel)
Set the response channel for incoming messages.

Parameters:
responseChannel - the response channel

get

public RpcMessage<?> get(RpcMessage<?> message)
Description copied from interface: AppmasterScOperations
Sends request wrapped in RpcMessage and receives response similarly wrapped in RpcMessage.

Specified by:
get in interface AppmasterScOperations
Parameters:
message - the RpcMessage request
Returns:
the RpcMessage response

getPayload

protected abstract T getPayload(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

Spring for Apache Hadoop