public final class Factory extends Object
| Constructor and Description |
|---|
Factory(WorkLevel lvl)
Initialize the factory
|
| Modifier and Type | Method and Description |
|---|---|
Client |
createClient()
Create a new client
|
Client |
createClient(int target_port)
Create a new client
|
Client |
createClient(String target_host,
int target_port)
Create a new client
|
Client |
createClient(String target_host,
int target_port,
int local_port)
Create a new client
|
Server |
createServer()
Create a new server
|
Server |
createServer(int target_port)
Create a new server
|
Server |
createServer(String target_host,
int target_port)
Create a new server
|
public Factory(WorkLevel lvl)
lvl - the work levelpublic Client createClient() throws IllegalArgumentException
IllegalArgumentException - if work level is UDPpublic Client createClient(int target_port) throws IllegalArgumentException
target_port - the server portIllegalArgumentException - if work level is UDPpublic Client createClient(String target_host, int target_port) throws IllegalArgumentException
target_host - the server hosttarget_port - the server portIllegalArgumentException - if work level is UDPpublic Client createClient(String target_host, int target_port, int local_port) throws IllegalArgumentException
target_host - the server hosttarget_port - the server portlocal_port - the client portIllegalArgumentException - if work level is UDPpublic Server createServer(int target_port) throws IllegalArgumentException
target_port - the server portIllegalArgumentException - if work level is UDPpublic Server createServer(String target_host, int target_port) throws IllegalArgumentException
target_host - the server addresstarget_port - the server portIllegalArgumentException - if work level is UDPpublic Server createServer() throws IllegalArgumentException
IllegalArgumentException - if work level is UDPCopyright © 2022. All rights reserved.