if (connection.getLocalState() == EndpointState.UNINITIALIZED)
{
connection.open();
}
Delivery delivery = connection.getWorkHead();
while (delivery != null)
{
Link link = delivery.getLink();
if (delivery.isUpdated())
{
if (link instanceof Sender)
{
delivery.disposition(delivery.getRemoteState());
}
StoreEntry e = (StoreEntry) delivery.getContext();
if (e != null) e.updated();
}
if (delivery.isReadable())
{
pumpIn( link.getSource().getAddress(), (Receiver)link );
}
Delivery next = delivery.getWorkNext();
delivery.clear();
delivery = next;
}
for (Session session : new Sessions(connection, UNINIT, ANY))