|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--aktbus.core.AktBusReceiver
The AktBusReceiver class receives an AktMessageInterface through a socket.
Constructor Summary | |
AktBusReceiver()
Creates an AktBusReceiver object that listens to a free port. |
|
AktBusReceiver(int port)
Creates an AktBusReceiver object that listens to a certain port. |
Method Summary | |
void |
close()
Shutdown the receiver and release the port in use. |
int |
get_port()
Returns the local port number that the AktBusReceiver is listening to. |
aktbus.core.AktMessage |
receive_message()
Receive and return an AktMessage. |
aktbus.core.AktMessageInterface |
receive_message(int timeout,
java.lang.Class reply_class)
Receive and return an AktMessageInterface with timeout and expect a reply of a certain class. |
aktbus.core.RDFAktMessage |
receive_RDFAktMessage()
|
aktbus.core.fipa.RDFFipaMessage |
receive_RDFFipaMessage()
|
aktbus.core.AktMessageWithExtra |
receive_with_extra()
Waits and receive an AktMessageWithExtra. |
aktbus.core.AktMessageWithExtra |
receive_with_extra(int timeout,
java.lang.Class result_class)
Waits and receive an AktMessageWithExtra with timeout. |
aktbus.core.AktMessageWithExtra |
receive_with_extra(int timeout,
java.lang.String class_string)
Waits and receive an AktMessageWithExtra with timeout. |
aktbus.core.AktMessageWithPath |
receive()
Waits and receive an AktMessageWithPath. |
aktbus.core.AktMessageWithPath |
receive(int timeout,
java.lang.Class result_class)
Waits and receive an AktMessageWithPath with timeout. |
aktbus.core.AktMessageWithPath |
receive(int timeout,
java.lang.String class_string)
Waits and receive an AktMessageWithPath with timeout. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AktBusReceiver() throws java.io.IOException
get_port()
method.
java.io.IOException
- When any I/O error occurs.public AktBusReceiver(int port) throws java.io.IOException
port
- The port number to listen.
If port
is 0
, then a free port will be used.
java.io.IOException
- When any I/O error occurs.Method Detail |
public int get_port()
public void close() throws java.io.IOException
java.io.IOException
- When an I/O error occurs during closing.public aktbus.core.RDFAktMessage receive_RDFAktMessage() throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public aktbus.core.fipa.RDFFipaMessage receive_RDFFipaMessage() throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public aktbus.core.AktMessage receive_message() throws org.xml.sax.SAXException, java.io.IOException, java.lang.Exception
receive_message(int)
instead
To reply an instance of a subclass of AktMessage
,
use receive_message(int,java.lang.String)
or receive_message(int,java.lang.Class)
.
org.xml.sax.SAXException
- When the received content cannot be parsed into XML.
java.io.IOException
- If anything goes wrong witht the I/O.
java.lang.Exception
- When other general error occurs.public aktbus.core.AktMessageInterface receive_message(int timeout, java.lang.Class reply_class) throws org.xml.sax.SAXException, java.io.IOException, java.lang.Exception
timeout
- The timeout value in second.reply_class
- The expect class of the replying message in a java.lang.Class object.
org.xml.sax.SAXException
- When the received content cannot be parsed into XML.
java.io.IOException
- If anything goes wrong witht the I/O.
java.lang.Exception
- When other general error occurs.public aktbus.core.AktMessageWithPath receive() throws java.io.IOException, org.xml.sax.SAXException, java.lang.Exception
org.xml.sax.SAXException
- When the received content cannot be parsed into XML.
java.io.IOException
- If anything goes wrong witht the I/O.
java.lang.Exception
- When other general error occurs.public aktbus.core.AktMessageWithPath receive(int timeout, java.lang.String class_string) throws java.io.IOException, org.xml.sax.SAXException, java.lang.Exception
timeout
- The timeout value in second.class_string
- The expected class of the reply as a String.
java.io.IOException
org.xml.sax.SAXException
java.lang.Exception
public aktbus.core.AktMessageWithPath receive(int timeout, java.lang.Class result_class) throws java.io.IOException, org.xml.sax.SAXException, java.lang.Exception
timeout
- The timeout value in second.result_class
- The expected class of the reply as an java.lang.Class object.
java.io.IOException
org.xml.sax.SAXException
java.lang.Exception
public aktbus.core.AktMessageWithExtra receive_with_extra() throws org.xml.sax.SAXException, java.io.IOException, java.lang.Exception
org.xml.sax.SAXException
java.io.IOException
java.lang.Exception
public aktbus.core.AktMessageWithExtra receive_with_extra(int timeout, java.lang.String class_string) throws java.io.IOException, org.xml.sax.SAXException, java.lang.Exception
timeout
- The timeout value in second.class_string
- The expected class of the reply message as a String.
java.io.IOException
org.xml.sax.SAXException
java.lang.Exception
public aktbus.core.AktMessageWithExtra receive_with_extra(int timeout, java.lang.Class result_class) throws java.io.IOException, org.xml.sax.SAXException, java.lang.Exception
timeout
- The timeout value in second.result_class
- The expected class of the reply message as a java.lang.Class object.
java.io.IOException
org.xml.sax.SAXException
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |