org.hypergraphdb.peer.workflow
Class DefaultActivityFactory

java.lang.Object
  extended by org.hypergraphdb.peer.workflow.DefaultActivityFactory
All Implemented Interfaces:
ActivityFactory

public class DefaultActivityFactory
extends java.lang.Object
implements ActivityFactory

A DefaultActivityFactory creates new activities through reflection on their activityClass member variable. The factory will attempt to construct an instance with the full set of the parameters of the make given that such a constructor exists. Otherwise, it will attempt with a reduced set, and possibly an empty set of parameters where it just expects a default constructor.

Author:
Borislav Iordanov

Constructor Summary
DefaultActivityFactory(java.lang.Class<? extends Activity> activityClass)
           
 
Method Summary
 java.lang.Class<?> getActivityClass()
           
 Activity make(HyperGraphPeer thisPeer, java.util.UUID id, Message msg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultActivityFactory

public DefaultActivityFactory(java.lang.Class<? extends Activity> activityClass)
Method Detail

make

public Activity make(HyperGraphPeer thisPeer,
                     java.util.UUID id,
                     Message msg)
Specified by:
make in interface ActivityFactory

getActivityClass

public java.lang.Class<?> getActivityClass()