if (ttl != null)
{
if (ttl > 0)
{
return new ConnectionEntry(conn, null, System.currentTimeMillis(), ttl);
}
throw new IllegalStateException("Stomp Connection TTL cannot be negative : " + ttl);
}
ttl = server.getConfiguration().getConnectionTTLOverride();
if (ttl != -1)
{
return new ConnectionEntry(conn, null, System.currentTimeMillis(), ttl);
}
else
{
// Default to 1 minute - which is same as core protocol
return new ConnectionEntry(conn, null, System.currentTimeMillis(), 1 * 60 * 1000);
}
}