2015-08-25 12:20:23 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2015 The Netty Project
|
|
|
|
*
|
|
|
|
* The Netty Project licenses this file to you under the Apache License,
|
|
|
|
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
|
|
* with the License. You may obtain a copy of the License at:
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*/
|
|
|
|
package io.netty.util.concurrent;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Expose details for a {@link Thread}.
|
|
|
|
*/
|
|
|
|
public interface ThreadProperties {
|
|
|
|
/**
|
2017-02-21 21:27:23 +01:00
|
|
|
* @see Thread#getState()
|
2015-08-25 12:20:23 +02:00
|
|
|
*/
|
|
|
|
Thread.State state();
|
|
|
|
|
|
|
|
/**
|
2017-02-21 21:27:23 +01:00
|
|
|
* @see Thread#getPriority()
|
2015-08-25 12:20:23 +02:00
|
|
|
*/
|
|
|
|
int priority();
|
|
|
|
|
|
|
|
/**
|
2017-02-21 21:27:23 +01:00
|
|
|
* @see Thread#isInterrupted()
|
2015-08-25 12:20:23 +02:00
|
|
|
*/
|
|
|
|
boolean isInterrupted();
|
|
|
|
|
|
|
|
/**
|
2017-02-21 21:27:23 +01:00
|
|
|
* @see Thread#isDaemon()
|
2015-08-25 12:20:23 +02:00
|
|
|
*/
|
|
|
|
boolean isDaemon();
|
|
|
|
|
|
|
|
/**
|
2017-02-21 21:27:23 +01:00
|
|
|
* @see Thread#getName()
|
2015-08-25 12:20:23 +02:00
|
|
|
*/
|
|
|
|
String name();
|
|
|
|
|
|
|
|
/**
|
2017-02-21 21:27:23 +01:00
|
|
|
* @see Thread#getId()
|
2015-08-25 12:20:23 +02:00
|
|
|
*/
|
|
|
|
long id();
|
|
|
|
|
|
|
|
/**
|
2017-02-21 21:27:23 +01:00
|
|
|
* @see Thread#getStackTrace()
|
2015-08-25 12:20:23 +02:00
|
|
|
*/
|
|
|
|
StackTraceElement[] stackTrace();
|
|
|
|
|
|
|
|
/**
|
2017-02-21 21:27:23 +01:00
|
|
|
* @see Thread#isAlive()
|
2015-08-25 12:20:23 +02:00
|
|
|
*/
|
|
|
|
boolean isAlive();
|
|
|
|
}
|