public class Bridge extends Object
A notifyAll
call is made on
the Bridge object whenever the number of live hubs connected by
the bridge changes.
Constructor and Description |
---|
Bridge(ClientProfile[] profiles)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
exportUrls(int index,
String host)
Sets up a URL exporter for one of the hubs.
|
HubConnector[] |
getBridgeClients()
Returns the hub connectors representing the bridge client running
on each linked hub.
|
ClientProfile[] |
getProfiles()
Returns the client profiles which define the hubs this bridge links.
|
static void |
main(String[] args)
Main method.
|
static int |
runMain(String[] args)
Does the work for the main method.
|
boolean |
start()
Starts this bridge running.
|
void |
stop()
Stops this bridge running.
|
public Bridge(ClientProfile[] profiles) throws IOException
profiles
- array of SAMP profile objects, one for each
hub which is to participate in the bridgeIOException
public ClientProfile[] getProfiles()
public HubConnector[] getBridgeClients()
public void exportUrls(int index, String host)
index
- index of the profile for which to export URLshost
- the name substitute for loopback host identifiers
on the host on which that profile's hub is runningpublic boolean start()
public void stop()
public static void main(String[] args) throws IOException
IOException
public static int runMain(String[] args) throws IOException
IOException
Copyright © 2008–2024. All rights reserved.