GigaSpaces XAP 9.7.2 API

org.openspaces.core.space.support
Class WorkerAdapter

java.lang.Object
  extended by org.openspaces.core.space.support.WorkerAdapter
All Implemented Interfaces:
EventListener, DisposableBean, InitializingBean, ApplicationListener

Deprecated. use EventDriven containers instead

@Deprecated
public class WorkerAdapter
extends Object
implements InitializingBean, DisposableBean, ApplicationListener

An adapter class that can run legacy IWorker implementations as beans providing the same behavior when configured within a Space.

Note, the adapter aims to simplify the migration from "worker" based applications to the new processing unit architecture.

Author:
kimchy

Constructor Summary
WorkerAdapter()
          Deprecated.  
 
Method Summary
 void afterPropertiesSet()
          Deprecated.  
 void destroy()
          Deprecated.  
 void onApplicationEvent(ApplicationEvent applicationEvent)
          Deprecated.  
 void setActiveWhenBackup(boolean activeWhenBackup)
          Deprecated. Should the worker be active only when the Space is in primary mode.
 void setArgument(String argument)
          Deprecated. Provides an optional argument that will be passed to IWorker.init(com.j_spaces.core.IJSpace, String, String) (the last argument).
 void setGigaSpace(GigaSpace gigaSpace)
          Deprecated. Sets the GigaSpace that will be used to pass an IJSpace instance to the worker init method.
 void setWorker(com.j_spaces.worker.IWorker worker)
          Deprecated. Provides the worker implementation that will be run.
 void setWorkerName(String workerName)
          Deprecated. Sets the worker name that will be used as the second parameter to the worker init method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkerAdapter

public WorkerAdapter()
Deprecated. 
Method Detail

setWorker

public void setWorker(com.j_spaces.worker.IWorker worker)
Deprecated. 
Provides the worker implementation that will be run.


setGigaSpace

public void setGigaSpace(GigaSpace gigaSpace)
Deprecated. 
Sets the GigaSpace that will be used to pass an IJSpace instance to the worker init method.


setArgument

public void setArgument(String argument)
Deprecated. 
Provides an optional argument that will be passed to IWorker.init(com.j_spaces.core.IJSpace, String, String) (the last argument).


setWorkerName

public void setWorkerName(String workerName)
Deprecated. 
Sets the worker name that will be used as the second parameter to the worker init method.


setActiveWhenBackup

public void setActiveWhenBackup(boolean activeWhenBackup)
Deprecated. 
Should the worker be active only when the Space is in primary mode. Defaults to false. Setting this to true means that the worker will start regardless of the space state.


afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Deprecated. 
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

destroy

public void destroy()
             throws Exception
Deprecated. 
Specified by:
destroy in interface DisposableBean
Throws:
Exception

onApplicationEvent

public void onApplicationEvent(ApplicationEvent applicationEvent)
Deprecated. 
Specified by:
onApplicationEvent in interface ApplicationListener

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.