jadex.micro.examples.mandelbrot
Class GenerateService

java.lang.Object
  extended by jadex.commons.service.BasicService
      extended by jadex.micro.examples.mandelbrot.GenerateService
All Implemented Interfaces:
IRemotable, IInternalService, IService, IGenerateService

public class GenerateService
extends BasicService
implements IGenerateService

Generate service implementation.


Field Summary
protected  GenerateAgent agent
          The agent.
protected  GeneratePanel panel
          The generate panel.
 
Fields inherited from class jadex.commons.service.BasicService
idcnt, properties, shutdowned, sid, started, startfutures
 
Fields inherited from interface jadex.commons.service.IService
EMPTY_SERVICES
 
Constructor Summary
GenerateService(GenerateAgent agent, GeneratePanel panel)
          Create a new service.
 
Method Summary
protected  void distributeWork(AreaData data, Collection sers, IDisplayService ds, Future ret)
          Distribute the work to different worker services.
 IFuture generateArea(AreaData data)
          Generate a specific area using a defined x and y size.
protected static IFuture getCalculateServices(GenerateAgent agent, int par)
          Get (and create) the calculate services.
 
Methods inherited from class jadex.commons.service.BasicService
createServiceIdentifier, generateServiceName, getPropertyMap, getServiceIdentifier, isValid, setPropertyMap, shutdownService, signalStarted, startService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jadex.commons.service.IService
getPropertyMap, getServiceIdentifier, signalStarted
 

Field Detail

agent

protected GenerateAgent agent
The agent.


panel

protected GeneratePanel panel
The generate panel.

Constructor Detail

GenerateService

public GenerateService(GenerateAgent agent,
                       GeneratePanel panel)
Create a new service.

Method Detail

generateArea

public IFuture generateArea(AreaData data)
Generate a specific area using a defined x and y size.

Specified by:
generateArea in interface IGenerateService

getCalculateServices

protected static IFuture getCalculateServices(GenerateAgent agent,
                                              int par)
Get (and create) the calculate services.


distributeWork

protected void distributeWork(AreaData data,
                              Collection sers,
                              IDisplayService ds,
                              Future ret)
Distribute the work to different worker services.



Copyright © 2010. All Rights Reserved.