|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.astrogrid.samp.bridge.Bridge
public class Bridge
Runs a bridging service between two or more hubs. For each client on one hub, a proxy client appears on all other participating hubs. These proxies can be treated in exactly the same way as normal clients by other registered clients; any messages sent to/from them will be marshalled over the bridge in a transparent way. One application for this is to allow collaboration between users who each have their own hub running.
A notifyAll call is made on
the Bridge object whenever the number of live hubs connected by
the bridge changes.
| Constructor Summary | |
|---|---|
Bridge(ClientProfile[] profiles)
Constructor. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Bridge(ClientProfile[] profiles)
throws IOException
profiles - array of SAMP profile objects, one for each
hub which is to participate in the bridge
IOException| Method Detail |
|---|
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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||