|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rutgers.winlab.jmfapi.JMFAPI
public class JMFAPI
Java API used to interface with MobilityFirst's stack prototype
Constructor Summary | |
---|---|
JMFAPI()
MobilityFirst socket object creation. |
Method Summary | |
---|---|
boolean |
isOpen()
Check if the the stack is open (done locally, no connection to stack). |
void |
jmfattach(GUID guid)
Add GUID reachability for the specified GUIDs. |
void |
jmfattach(GUID[] GUIDs)
Add GUID reachability for the specified GUIDs. |
void |
jmfclose()
Close the socket connection with the stack. |
void |
jmfdetach(GUID guid)
Remove GUID reachability for the specified GUID. |
void |
jmfdetach(GUID[] GUIDs)
Remove GUID reachability for the specified GUIDs. |
void |
jmfopen(java.lang.String profile)
Open the socket connection with the stack |
void |
jmfopen(java.lang.String profile,
GUID guid)
Open the socket connection with the stack |
void |
jmfopen(java.lang.String profile,
MFFlag opts)
Open the socket connection with the stack |
void |
jmfopen(java.lang.String profile,
MFFlag opts,
GUID guid)
Open the socket connection with the stack |
int |
jmfrecv_blk(GUID sGUID,
byte[] data,
int size)
Tries to receive the last message received. |
int |
jmfrecv_blk(GUID sGUID,
byte[] data,
int size,
GUID[] src_GUID)
Tries to receive the last message received. |
int |
jmfrecv(GUID sGUID,
byte[] data,
int size)
Tries to receive the last message received. |
int |
jmfrecv(GUID sGUID,
byte[] data,
int size,
GUID[] src_GUID)
Tries to receive the last message received. |
int |
jmfsend(byte[] data,
int size,
GUID dst_GUID)
Send a chunk of data. |
int |
jmfsend(byte[] data,
int size,
GUID dst_GUID,
MFFlag opts)
Send a chunk of data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JMFAPI()
Method Detail |
---|
public void jmfopen(java.lang.String profile) throws JMFException
profile
- At the moment contains the string representing the destination GUID
JMFException
- if an error occurs during the open operation.
Usually is due to an error at the API level and in that case contains the errno valuepublic void jmfopen(java.lang.String profile, MFFlag opts) throws JMFException
profile
- At the moment contains the string representing the destination GUIDopts
- Options parameter; can NOT be null
JMFException
- if an error occurs during the open operation.
Usually is due to an error at the API level and in that case contains the errno valuepublic void jmfopen(java.lang.String profile, GUID guid) throws JMFException
profile
- At the moment contains the string representing the destination GUIDguid
- Contains the source GUID
JMFException
- if an error occurs during the open operation.
Usually is due to an error at the API level and in that case contains the errno valuepublic void jmfopen(java.lang.String profile, MFFlag opts, GUID guid) throws JMFException
profile
- At the moment contains the string representing the destination GUIDguid
- Contains the source GUIDopts
- Options parameter; can NOT be null
JMFException
- if an error occurs during the open operation.
Usually is due to an error at the API level and in that case contains the errno valuepublic int jmfsend(byte[] data, int size, GUID dst_GUID, MFFlag opts) throws JMFException
data
- data to be sentsize
- size of the chunkdst_GUID
- destination GUID for the packetopts
- Options parameter; can NOT be null
JMFException
- if an error occurs during the send operation
Usually is due to an error at the API level and in that case contains the errno valuepublic int jmfsend(byte[] data, int size, GUID dst_GUID) throws JMFException
data
- data to be sentsize
- size of the chunkdst_GUID
- destination GUID for the packet
JMFException
- if an error occurs during the send operation
Usually is due to an error at the API level and in that case contains the errno valuepublic int jmfrecv(GUID sGUID, byte[] data, int size, GUID[] src_GUID) throws JMFException
sGUID
- GUID of the sender. Is written if not null (as of now only null values are acceptable)data
- buffer to be used for the received datasize
- max number of bytes that should be receivedsrc_GUID
- set of GUIDs to filter receive
JMFException
- if an error occurs during the recv operation
Usually is due to an error at the API level and in that case contains the errno valuepublic int jmfrecv(GUID sGUID, byte[] data, int size) throws JMFException
sGUID
- GUID of the sender. Is written if not null (as of now only null values are acceptable)data
- buffer to be used for the received datasize
- max number of bytes that should be received
JMFException
- if an error occurs during the recv operation
Usually is due to an error at the API level and in that case contains the errno valuepublic int jmfrecv_blk(GUID sGUID, byte[] data, int size, GUID[] src_GUID) throws JMFException
sGUID
- GUID of the sender. Is written if not null (as of now only null values are acceptable)data
- buffer to be used for the received datasize
- max number of bytes that should be receivedsrc_GUID
- set of GUIDs to filter receive
JMFException
- if an error occurs during the recv operation
Usually is due to an error at the API level and in that case contains the errno valuepublic int jmfrecv_blk(GUID sGUID, byte[] data, int size) throws JMFException
sGUID
- GUID of the sender. Is written if not null (as of now only null values are acceptable)data
- buffer to be used for the received datasize
- max number of bytes that should be received
JMFException
- if an error occurs during the recv operation
Usually is due to an error at the API level and in that case contains the errno valuepublic void jmfattach(GUID[] GUIDs) throws JMFException
GUIDs
- set of GUIDs to add to socket end point
JMFException
- if an error occurs during the attach operation
Usually happens if the stack was not able to add reachabilitypublic void jmfattach(GUID guid) throws JMFException
guid
- GUID to add to socket end point
JMFException
- if an error occurs during the attach operation
Usually happens if the stack was not able to add reachabilitypublic void jmfdetach(GUID[] GUIDs) throws JMFException
GUIDs
- set of GUIDs to remove to socket end point
JMFException
- if an error occurs during the detach operation
Usually happens if the stack was not able to remove reachabilitypublic void jmfdetach(GUID guid) throws JMFException
guid
- GUID to remove to socket end point
JMFException
- if an error occurs during the detach operation
Usually happens if the stack was not able to remove reachabilitypublic void jmfclose() throws JMFException
JMFException
- if an error occurs during the close operation
Usually is due to an error at the API level and in that case contains the errno valuepublic boolean isOpen()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |