|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.p2p.gui.PeerApplication
public class PeerApplication
| Constructor Summary | |
|---|---|
PeerApplication()
Equivalent to PeerApplication(null,true) |
|
PeerApplication(AutoMedPeer peer)
Start peer app with a peer |
|
PeerApplication(Gui gui,
boolean standalone)
Create a GUI application to access the P2P system. |
|
| Method Summary | |
|---|---|
void |
advertizePath(SchemaDescription publicSchema)
|
void |
broker(PeerDescription peerDesc)
Ask a peer to act as a broker for a query, executing the query against its local data sources, and those of any other peers that the peer knows about that implement public schemas of that peer. |
void |
broker(PeerDescription peerDesc,
java.lang.String schema,
java.lang.String query)
|
void |
close()
Close the AutoMedPeer, and allow to register as a new peer |
AutoMedPeer |
getAutoMedPeer()
Return the AutoMedPeer this application provides a UI for. |
java.util.Collection |
getObjectsFor(MainFrame frame)
|
void |
getPathway(PeerDescription peer)
|
PeerCache |
getPeerCache()
Return the reference to PeerCache object which stores peer data |
void |
getSchema(SchemaDescription schema)
Edited by MDLE on 19/10/2005 to also query associated models if required |
void |
getSourcePath(PeerDescription peerDesc)
Get the pathway from a peer between a public schema and any named schema at that peer. |
PeerStateHandler |
getStateHandler()
Return the peer-wise state handler object. |
java.lang.String |
getTitleFor(MainFrame frame)
|
static UserActionResult |
getTool(java.lang.Object[] o)
Method for the AutoMed GUI to call to launch the P2P system. |
protected void |
initPeer(java.lang.String name,
PeerStateHandler stateHandler)
Intialise peer by creating a singleton object to be used throughout the application This method is only invoked by LoginFrame and not by outside classes. |
void |
joinNetwork()
|
void |
launchGui()
|
void |
launchLoginFrame()
|
void |
launchMainFrame()
|
void |
loggedIn()
The application has now logged in to the Directory, so enter "running" state where communication with Directory can be made. |
static void |
main(java.lang.String[] args)
|
void |
publishSchema()
|
void |
query(PeerDescription peerDesc)
Run a query on a peer. |
void |
refreshFor(MainFrame frame)
|
void |
setGui(Gui gui)
Set a GUI object |
void |
showAllSchemas()
|
void |
showSchema(SchemaDescription schema)
|
void |
wrap(PeerDescription peerDesc)
Store the details of a PeerDescription as an AccessMethod in the local repository. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PeerApplication()
public PeerApplication(Gui gui,
boolean standalone)
gui - An AutoMed @link{Gui} that this PeerApplication
should inform of changes to the P2P connection state.standalone - When set to true, the application is designed to run
alone, and has extra buttons to allow its different windows to open
each other, and also run the AutoMed GUI. Normally the gui being non-null
implies this parameter is false.public PeerApplication(AutoMedPeer peer)
| Method Detail |
|---|
protected void initPeer(java.lang.String name,
PeerStateHandler stateHandler)
throws P2PException,
java.io.IOException,
AutoMedException
P2PException
java.io.IOException
AutoMedExceptionpublic AutoMedPeer getAutoMedPeer()
AutoMedPeer this application provides a UI for.
The peer will only be returned once the user has logged in to
both the local P2PRegistry and global P2PDirectory
public PeerCache getPeerCache()
PeerCache object which stores peer data
public void close()
public void setGui(Gui gui)
public void launchLoginFrame()
public void launchMainFrame()
public void loggedIn()
throws AutoMedException
AutoMedExceptionpublic static void main(java.lang.String[] args)
public java.util.Collection getObjectsFor(MainFrame frame)
frame -
public java.lang.String getTitleFor(MainFrame frame)
frame -
public PeerStateHandler getStateHandler()
public void refreshFor(MainFrame frame)
public void showSchema(SchemaDescription schema)
schema - public void showAllSchemas()
public void launchGui()
public void advertizePath(SchemaDescription publicSchema)
public void publishSchema()
public void getSchema(SchemaDescription schema)
schema -
public void broker(PeerDescription peerDesc,
java.lang.String schema,
java.lang.String query)
public void broker(PeerDescription peerDesc)
peerDesc - the Peer on which the broker query should start atpublic void query(PeerDescription peerDesc)
peerDesc - The description of the peer on which to run the
query.public void wrap(PeerDescription peerDesc)
public void getSourcePath(PeerDescription peerDesc)
peerDesc - peer to retrieve path from public schema to data
sources.public void getPathway(PeerDescription peer)
peer - public static UserActionResult getTool(java.lang.Object[] o)
public void joinNetwork()
throws AutoMedException
AutoMedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||