Search in sources :

Example 6 with Connection

use of com.swiftmq.swiftlet.net.Connection in project swiftmq-ce by iitsoftware.

the class MQTTSwiftlet method performTimeAction.

public void performTimeAction() {
    Connection[] c = (Connection[]) connections.toArray(new Connection[connections.size()]);
    for (int i = 0; i < c.length; i++) {
        MQTTConnection vc = (MQTTConnection) c[i].getUserObject();
        vc.collect(lastCollect);
    }
    lastCollect = System.currentTimeMillis();
}
Also used : MQTTConnection(com.swiftmq.impl.mqtt.connection.MQTTConnection) MQTTConnection(com.swiftmq.impl.mqtt.connection.MQTTConnection) Connection(com.swiftmq.swiftlet.net.Connection)

Aggregations

Connection (com.swiftmq.swiftlet.net.Connection)6 ConnectionManager (com.swiftmq.swiftlet.net.ConnectionManager)4 MQTTConnection (com.swiftmq.impl.mqtt.connection.MQTTConnection)3 SwiftletException (com.swiftmq.swiftlet.SwiftletException)3 ConnectionVetoException (com.swiftmq.swiftlet.net.ConnectionVetoException)3 Semaphore (com.swiftmq.tools.concurrent.Semaphore)2 SASLProvider (com.swiftmq.impl.amqp.sasl.provider.SASLProvider)1 Entity (com.swiftmq.mgmt.Entity)1 EntityRemoveException (com.swiftmq.mgmt.EntityRemoveException)1 Property (com.swiftmq.mgmt.Property)1