public class ThreadPool
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.Hashtable<java.lang.String,MQTTPublisher> |
publisherTable |
java.util.Hashtable<java.lang.String,MQTTSubscriber> |
subscriberTable |
java.util.Hashtable<java.lang.String,j2se.windows.MQTTEndUser.RandomDataThread> |
threadTable |
Constructor and Description |
---|
ThreadPool() |
Modifier and Type | Method and Description |
---|---|
int |
availablePublisher() |
int |
availableSubscriber() |
MQTTPublisher |
getPublisher(java.lang.String ipandport,
java.lang.String threadName,
java.lang.String topic,
int qos) |
MQTTSubscriber |
getSubscriber(java.lang.String ipandport,
java.lang.String threadName,
java.lang.String topic,
int qos) |
j2se.windows.MQTTEndUser.RandomDataThread |
getThread(java.lang.String threadName) |
boolean |
returnPublisherThreadToPool(MQTTPublisher t) |
boolean |
returnSubscriberThreadToPool(MQTTSubscriber t) |
boolean |
returnThreadToPool(j2se.windows.MQTTEndUser.RandomDataThread t) |
public java.util.Hashtable<java.lang.String,j2se.windows.MQTTEndUser.RandomDataThread> threadTable
public java.util.Hashtable<java.lang.String,MQTTSubscriber> subscriberTable
public java.util.Hashtable<java.lang.String,MQTTPublisher> publisherTable
public j2se.windows.MQTTEndUser.RandomDataThread getThread(java.lang.String threadName)
threadName
- public boolean returnThreadToPool(j2se.windows.MQTTEndUser.RandomDataThread t)
t,
- a returned threadpublic MQTTPublisher getPublisher(java.lang.String ipandport, java.lang.String threadName, java.lang.String topic, int qos)
public boolean returnPublisherThreadToPool(MQTTPublisher t)
t,
- a returned threadpublic MQTTSubscriber getSubscriber(java.lang.String ipandport, java.lang.String threadName, java.lang.String topic, int qos)
public boolean returnSubscriberThreadToPool(MQTTSubscriber t)
t,
- a returned threadpublic int availableSubscriber()
public int availablePublisher()