connection manager type hierarchy
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
package com.muwire.core.connection
|
||||||
|
|
||||||
|
import com.muwire.core.EventBus
|
||||||
|
|
||||||
|
abstract class ConnectionManager {
|
||||||
|
|
||||||
|
final EventBus eventBus
|
||||||
|
|
||||||
|
ConnectionManager(EventBus eventBus) {
|
||||||
|
this.eventBus = eventBus
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.muwire.core.connection
|
||||||
|
|
||||||
|
import com.muwire.core.EventBus
|
||||||
|
|
||||||
|
class LeafConnectionManager extends ConnectionManager {
|
||||||
|
|
||||||
|
final int maxConnections
|
||||||
|
|
||||||
|
public LeafConnectionManager(EventBus eventBus, int maxConnections) {
|
||||||
|
super(eventBus)
|
||||||
|
this.maxConnections = maxConnections
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.muwire.core.connection
|
||||||
|
|
||||||
|
import com.muwire.core.EventBus
|
||||||
|
|
||||||
|
class UltrapeerConnectionManager extends ConnectionManager {
|
||||||
|
|
||||||
|
final int maxPeers, maxLeafs
|
||||||
|
|
||||||
|
public UltrapeerConnectionManager(EventBus eventBus, int maxPeers, int maxLeafs) {
|
||||||
|
super(eventBus)
|
||||||
|
this.maxPeers = maxPeers
|
||||||
|
this.maxLeafs = maxLeafs
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user