|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.fosstrak.ale.client.ReportHandler
public class ReportHandler
This class listen to a specified port for ec reports and notifies his subscribers about new ec reports.
Constructor Summary | |
---|---|
ReportHandler(int port)
Constructor opens the server socket and starts the thread. |
Method Summary | |
---|---|
void |
addListener(ReportHandlerListener listener)
This mehtod adds a new subscriber to the list of listeners. |
static void |
main(java.lang.String[] args)
This method starts the ReportHandler. |
void |
removeListener(ReportHandlerListener listener)
This method removes a subscriber from the list of listeners. |
void |
run()
This method contains the main loop of the thread, in which data is read from the socket and forwarded to the method notifyListeners(). |
void |
stop()
This method stops the thread and closes the socket |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReportHandler(int port) throws org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
port
- on which the ALE notifies
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException
- if server socket could not be created on specified port.
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
Method Detail |
---|
public void addListener(ReportHandlerListener listener)
listener
- to add to this ReportHandlerpublic void removeListener(ReportHandlerListener listener)
listener
- to remove from this ReportHandlerpublic void run()
run
in interface java.lang.Runnable
public void stop()
public static void main(java.lang.String[] args) throws org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
args
- command line arguments, which can contain the port number
org.fosstrak.reader.rp.proxy.RPProxyException
- if something goes wrong while creating the ReportHandler
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |