public class ServerP2P
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static boolean |
DEBUG |
private Directories |
directories |
private Logger |
logger |
private HostItem |
server |
private static java.lang.String |
subdir |
private HostItem |
tracker |
Constructor and Description |
---|
ServerP2P(java.lang.String hostnameServer,
int portServer,
java.lang.String hostnameTracker,
int portTracker,
boolean isInteractive)
Constructor with portServerstr containing a port number.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Main program entry point
first parameter is port number and is mandatory
to test, run with: java serverP2P.ServerP2P
|
private Directories directories
private static final java.lang.String subdir
private Logger logger
private HostItem tracker
private HostItem server
static final boolean DEBUG
public ServerP2P(java.lang.String hostnameServer, int portServer, java.lang.String hostnameTracker, int portTracker, boolean isInteractive)
hostnameServer
- binded hostnameportServer
- binded porthostnameTracker
- tracker hostnameportTracker
- tracker portisInteractive
- true if application in interactive mode