Package arc.net
Interface EndPoint
- All Superinterfaces:
Runnable
Represents the local end point of a connection.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(NetListener listener) Adds a listener to the endpoint.voidclose()Returns the last thread that calledupdate(int)for this end point.voidremoveListener(NetListener listener) voidrun()Continually updates this end point untilstop()is called.voidstart()Starts a new thread that callsrun().voidstop()Closes this end point and causesrun()to return.voidupdate(int timeout)
-
Method Details
-
addListener
Adds a listener to the endpoint. If the listener already exists, it is not added again. -
removeListener
-
run
void run()Continually updates this end point untilstop()is called. -
start
void start()Starts a new thread that callsrun(). -
stop
void stop()Closes this end point and causesrun()to return. -
close
void close() -
update
- Throws:
IOException- See Also:
-
getUpdateThread
Thread getUpdateThread()Returns the last thread that calledupdate(int)for this end point. This can be useful to detect when long running code will be run on the update thread.
-