|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface acts as a "facade" for the entire Peer2Me framework as the methods in this interface is the only methods the MIDlets running the framework needs access to. To use the Peer2Me framework, the MIDlets should run the FrameworkFrontEnd.getInstance() which returns a reference of type Framework. All framework services is then available through this reference.
Method Summary | |
void |
connectToNodes(java.lang.String[] addresses)
This method connects multiple devices in a network. |
java.util.Enumeration |
getFileList(java.lang.String root)
This method returns a list of the files in the given root directory on the device |
void |
initFramework(java.lang.String nodeName,
java.lang.String midletName,
java.lang.String preferredNetwork)
This method initiates the framework, and is the first method that should be run after getting a instance of the framework. |
void |
sendFilePackage(java.lang.String[] recipients,
java.lang.String filePath)
This method sends a file package over the network. |
void |
sendTextPackage(java.lang.String[] recipients,
java.lang.String textMessage)
This method sends a text package over the network. |
void |
shutdownFramework()
This method shuts down the framework and closes all the open network connections and streams. |
void |
startNodeSearch()
This method starts a search for devices running the same MIDlet. |
Method Detail |
public void initFramework(java.lang.String nodeName, java.lang.String midletName, java.lang.String preferredNetwork) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.io.IOException, java.lang.Exception
nodeName
- The name of the user of the MIDlet.midletName
- The name of the MIDlet, eventually translated into a ServiceID used to find other devices running the same MIDlet.preferredNetwork
- Deciding which network implementation to use.
java.lang.ClassNotFoundException
- The input preferredNetwork is invalid
java.lang.IllegalAccessException
- The input preferredNetwork is invalid
java.lang.InstantiationException
- The input preferredNetwork is invalid
java.io.IOException
- Error initiating framework
java.lang.Exception
- Error initiating frameworkpublic void shutdownFramework()
public void startNodeSearch() throws java.io.IOException
java.io.IOException
- Thrown if the search crashespublic void connectToNodes(java.lang.String[] addresses)
addresses
- The addresses of the devices to connect to.public void sendTextPackage(java.lang.String[] recipients, java.lang.String textMessage)
recipients
- A list containing the addresses of the recipient nodestextMessage
- The text message to be sentpublic void sendFilePackage(java.lang.String[] recipients, java.lang.String filePath)
recipients
- A list containing the addresses of the recipient nodesfilePath
- The path of the file to be sentpublic java.util.Enumeration getFileList(java.lang.String root)
root
- The path to the root directory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |