Package com.caen.TCPPort
Class TCPPort
- java.lang.Object
-
- com.caen.TCPPort.TCPPort
-
public class TCPPort extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected EventListenerListlistenerListprotected SocketmSocketprotected TCPPortEventThreadmTCPEventThread
-
Constructor Summary
Constructors Constructor Description TCPPort()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEventListener(TCPPortEventListener listener)voidclose()voidconnect(String ip, int port)voidfireOnDataEvent(TCPPortEvent evt)InputStreamgetInputStream()OutputStreamgetOutputStream()voidremoveEventListener(TCPPortEventListener listener)
-
-
-
Field Detail
-
mSocket
protected Socket mSocket
-
mTCPEventThread
protected TCPPortEventThread mTCPEventThread
-
listenerList
protected EventListenerList listenerList
-
-
Constructor Detail
-
TCPPort
public TCPPort() throws IOException- Throws:
IOException
-
-
Method Detail
-
connect
public void connect(String ip, int port) throws IOException
- Throws:
IOException
-
addEventListener
public void addEventListener(TCPPortEventListener listener) throws TooManyListenersException
- Throws:
TooManyListenersException
-
removeEventListener
public void removeEventListener(TCPPortEventListener listener)
-
fireOnDataEvent
public void fireOnDataEvent(TCPPortEvent evt)
-
getInputStream
public InputStream getInputStream() throws IOException
- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Throws:
IOException
-
close
public void close() throws CAENRFIDException- Throws:
CAENRFIDException
-
-