com.sun.enterprise.web.connector.grizzly
Class GrizzlyThreadFactory

java.lang.Object
  extended by com.sun.enterprise.web.connector.grizzly.GrizzlyThreadFactory
All Implemented Interfaces:
ThreadFactory

public class GrizzlyThreadFactory
extends Object
implements ThreadFactory

Customized ThreadFactory used by the Pipeline instance.

Author:
Jean-Francois Arcand

Field Summary
protected  String name
          The name used when creating threads
protected  int port
          The port used when created threads' name.
protected  int priority
          The priority used when creating threads.
protected  int threadCount
          The number of created threads.
 
Constructor Summary
GrizzlyThreadFactory(String name, int port, int priority)
          Create an instance of ThreadFactory
 
Method Summary
 ThreadGroup getThreadGroup()
          Return the ThreadGroup used by this factory
 boolean interruptThread(long threadID)
          Interrupt the Thread using it thread id
 Thread newThread(Runnable r)
          Create a new thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
The name used when creating threads


port

protected int port
The port used when created threads' name.


threadCount

protected int threadCount
The number of created threads.


priority

protected int priority
The priority used when creating threads.

Constructor Detail

GrizzlyThreadFactory

public GrizzlyThreadFactory(String name,
                            int port,
                            int priority)
Create an instance of ThreadFactory

Parameters:
name - the name of thread who will be created by this factory
port - the port of thread who will be created by this factory
priority - the priority of thread who will be created by this factory
Method Detail

newThread

public Thread newThread(Runnable r)
Create a new thread.

Specified by:
newThread in interface ThreadFactory
Parameters:
r - an instance of a Task.
Returns:
a new Thread.

getThreadGroup

public ThreadGroup getThreadGroup()
Return the ThreadGroup used by this factory


interruptThread

public boolean interruptThread(long threadID)
Interrupt the Thread using it thread id



Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.