org.axonframework.common
Class AxonThreadFactory

java.lang.Object
  extended by org.axonframework.common.AxonThreadFactory
All Implemented Interfaces:
ThreadFactory

public class AxonThreadFactory
extends Object
implements ThreadFactory

Thread factory that created threads in a given group.

Since:
2.0
Author:
Allard Buijze

Constructor Summary
AxonThreadFactory(int priority, ThreadGroup group)
          Initializes a ThreadFactory instance that create each thread in the given group with given priority.
AxonThreadFactory(String groupName)
          Initializes a ThreadFactory instance that creates each thread in a group with given groupName with default priority.
AxonThreadFactory(ThreadGroup group)
          Initializes a ThreadFactory instance that create each thread in the given group with default priority.
 
Method Summary
 Thread newThread(Runnable r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxonThreadFactory

public AxonThreadFactory(String groupName)
Initializes a ThreadFactory instance that creates each thread in a group with given groupName with default priority.

Parameters:
groupName - The name of the group to create each thread in
See Also:
Thread.setPriority(int)

AxonThreadFactory

public AxonThreadFactory(ThreadGroup group)
Initializes a ThreadFactory instance that create each thread in the given group with default priority.

Parameters:
group - The ThreadGroup to create each thread in
See Also:
Thread.setPriority(int)

AxonThreadFactory

public AxonThreadFactory(int priority,
                         ThreadGroup group)
Initializes a ThreadFactory instance that create each thread in the given group with given priority.

Parameters:
priority - The priority of the threads to create
group - The ThreadGroup to create each thread in
See Also:
Thread.setPriority(int)
Method Detail

newThread

public Thread newThread(Runnable r)
Specified by:
newThread in interface ThreadFactory


Copyright © 2010-2016. All Rights Reserved.