[FIX] session will now work with more than 5 users

Added a default annotation that is used for every
user that could not get a unique color id.

Change-Id: I100a0360c660886fc6c9feb6e4d0c7555a70aacd
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/629
Tested-by: Jenkins CI
Reviewed-by: Franz Zieris <zieris@inf.fu-berlin.de>
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[FIX] ensure that all negotiation processes are terminated

The InviteAndLeaveTest have shown that almost
always the project negotiation will not be
correctly notified when a session ends
and so ends up with a dead process or
the session was already stopped
and the negotiation process was still
running and so produced massive NPE
exceptions.


Change-Id: I680c6cd936704e2c9643d4b4544e2eb3d31580d9
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/603
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] ensure that the negotiation process is always removed

Just moved the logic for this behavior into the finally
blocks of the affected methods.

Change-Id: Ia02cf57667d8c7fa5e09aa97655acdbb5d0e1ace
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/631
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[FIX] #788 Selection and Contribution Colors are the same 

Adjusted the color values for the selection annotation.

Change-Id: Iece6e4548fb8e4f5bce7f262f42c4464d0d48593
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/623
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[STF] added test case for bug #793 

See: #793 Partial Sharing overwrite non shared files 
https://sourceforge.net/p/dpp/bugs/793/

Change-Id: I65c1e2ecee55dd4f61edca4e2603b9f3b60207b3
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/634
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[BUILD] Opened release branch 13.3.15

Change-Id: I70c381684a7546847f4927ccd740284fee64e428
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/632
Tested-by: Jenkins CI
Reviewed-by: Michael Scheppat <mschepp@zedat.fu-berlin.de>
Reviewed-by: Franz Zieris <zieris@inf.fu-berlin.de>
[FIX] session and project negotiation processes were not removed

It it possible that the incoming negotiation processes can
be canceled before they even start.

Corrected the logic so that the processes are always removed.

Change-Id: Ie42905b5841e3660fa9749fffad102b94af92b1f
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/636
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[REFACTOR] simplify color assignment algorithm

Try to comprehend algorithm, recognize contiguous
blocks of logic, extract those blocks, comment.
Try to make it more readable in general.

Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/#/c/638/

Change-Id: I5b00122377a831fefdee1c8aab08c74b9349d87a
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/640
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[FIX] ensure optimal color assignment

An invariant is introduced stating that
each distinct favorite color is used once in the assignment.
If the invariant is not satisfied, colors a reassigned.

Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/#/c/639/

Change-Id: I8d9fed0ef9b5442c9462c8c8542ae357cbf676e5
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/641
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] peersForIBB collection was not thread safe

On some paths the list was accessed without a lock.
Just wrapped the list with Collections.synchronizedList

Change-Id: I372b762c4bd25dbecee05ac252a297bd6ea6f631
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/642
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] do not interrupt the receiver thread prematurely

As this will cause unnecessary errors in the log file if
IBB is used.

Also moved the listener callback out of the synchronized
block of the close method as it does not make any
difference.

Change-Id: I11e11e834df3735dbbd1848e75ad87b76345aa93
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/643
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] release non used threads

The Socks5Transport is mostly used at the beginning of
a session and seldom during a running session.

The current implementation used a fixed thread pool and
so wasting resources because they are not needed as
most threads will always be in a idle state.

Replaced the FixedThreadPool with a CachedThreadPool
that will release non needed threads if they become
idle for more than 60 seconds.


Change-Id: I8e7eab756f7ab9665a2b98a5c802b31763a49b9d
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/644
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[REFACTOR] renamed method in the IncomingTransferObject interface

Renamed the method to reflect its real purpose.

Change-Id: I053c1b040274f5ec8c0089b3743eeb106287c7fc
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/645
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] simplified packet reassembling

The original packet reassembling was more than complex.

Reason: The whole project archive was not streamed but
send as one packet (which was fragmented during transmission)

As it should be possible to cancel the file transfer during
a project synchronization the possibility to cancel the transfer
was implemented into the network layer and became obsolete
with commit 918f9026b752cf96b211c776ed76a9438f3d7bf7 and
so commit ac9165cd677e268fa9c0c8318b380066d0a5fcee and
92e6de9812128bee351ccd4045dcb9af3bca4ef9 removed all
artifacts that were needed to implement this behavior.

This patch removed the last artifact: the reassembling
of packets fragment in an external thread.

The packet fragments are now reassembled in the
BinaryChannel and the TransferObject is only forwarded 
if all fragments of a packet have arrived.

Change-Id: I08d9ec2f33f2f8119c6e7c5f3d739fdc9e94774f
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/647
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[NOP] removed unused variable

Change-Id: If4dcdd95d827509c59f4ce58986fe6f957c8819f
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/646
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[API] removed the isSending method from the DataTransferManager

Because this method is not used anywhere.

Change-Id: Ic9eed3e4dbf83fce3682a60022aeb33ff7256235
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/648
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[API] removed the isReceiving method from the DataTransferManager

This method was only used by the ActivitySequencer to "guess"
if it should wait a little bit longer until to discard 
activities.

As nobody knows how long the transmission may take this
logic part does not solve anything.

Just increased the timeout as it would be if the
DataTransferManager would currently receive data.

Last but not least the transfer of activities via 
chat is currently disabled so it is currently impossible
to receive activities with non linear sequence numbers.

Change-Id: I2af8728773bec4ea4b7a6a687851b2806f0131c9
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/649
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[API] changed the signature of IncomingTransferObject#getPayload

This method does no longer throws an IOException.

Change-Id: If9b48b808224abdccb15d43b3a0b523b0c86810a
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/650
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[API|REFACTOR] changed method signatures and cleaned up code

Changed some method signatures of the IReceiver and
IncomingTransferObject interfaces.

Cleaned up code in the XMPPReceiver class and added
/ corrected JavaDoc to the IReceiver, XMPPReceiver and
IComingTransferObject classes / interfaces.


Change-Id: I41ed1fbc13a2c79f4f5bc7f082d68aca20853398
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/651
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[FIX] #226, #684, #436

These defects had already been fixed in Saros Light so
I just copied the class.

As for defect #226. This feature is fixed by removing it.
It is not likely that someone will miss it as it is not
the normal case that you got disconnected due to an error.

Change-Id: I1fe35c62f7fba38da07ced65413a99d4b047f50f
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/652
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>