|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
net.sf.jaer.eventio.AEServerSocket
public class AEServerSocket
Following is target functionality (right now this class only opens a single socket to most recent client connecting to it and events are only streamed to this one socket): This server socket allows a source host to listen for connections from other hosts and open AESockets to them to allow streaming AE data to them, so as a server, we stream events to the clients. These stream socket connections transmit data reliably.
Multile clients can recieve events from a single server through the use of java.nio channels and selectors.
The AESocket's are manufactured when a client connects to the AEViewer. The AESocket's are built with options that are set using the AEServerSocketOptionsDialog. This AEServerSocket is a Thread and it must be started after construction to allow incoming connections.
AEServerSocket has PropertyChangeSupport; see the getSupport()
method for change event information.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
DEFAULT_BUFFERED_STREAM_SIZE_BYTES
|
static int |
DEFAULT_RECIEVE_BUFFER_SIZE_BYTES
|
static int |
DEFAULT_SEND_BUFFER_SIZE_BYTES
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AEServerSocket()
Creates a new instance of AEServerSocket. |
Method Summary | |
---|---|
void |
close()
shuts down the server socket thread and closes the server socket |
AESocket |
getAESocket()
|
int |
getBufferedStreamSize()
|
int |
getPort()
|
int |
getReceiveBufferSize()
|
int |
getSendBufferSize()
|
java.beans.PropertyChangeSupport |
getSupport()
PropertyChange events are fired as follows: "clientconnected" - when a client has connected to us. |
boolean |
isFlushPackets()
|
boolean |
isUseBufferedStreams()
|
static void |
main(java.lang.String[] a)
Tests class by constructing a socket and starting the thread |
void |
run()
Accepts incoming connections and manufactures AESocket's for them. |
void |
setBufferedStreamSize(int bufferedStreamSize)
|
void |
setFlushPackets(boolean flushPackets)
|
void |
setPort(int port)
|
void |
setReceiveBufferSize(int receiveBufferSize)
|
void |
setSendBufferSize(int sendBufferSize)
|
void |
setSocket(AESocket socket)
|
void |
setUseBufferedStreams(boolean useBufferedStreams)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BUFFERED_STREAM_SIZE_BYTES
public static final int DEFAULT_SEND_BUFFER_SIZE_BYTES
public static final int DEFAULT_RECIEVE_BUFFER_SIZE_BYTES
Constructor Detail |
---|
public AEServerSocket() throws java.io.IOException
java.net.BindException
- when the socket is already bound (probably by another viewer)
java.io.IOException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Thread
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public AESocket getAESocket()
public void setSocket(AESocket socket)
public static void main(java.lang.String[] a)
public void setBufferedStreamSize(int bufferedStreamSize)
public void setSendBufferSize(int sendBufferSize)
public void setPort(int port)
public int getSendBufferSize()
public int getBufferedStreamSize()
public int getReceiveBufferSize()
public void setReceiveBufferSize(int receiveBufferSize)
public int getPort()
public boolean isFlushPackets()
public void setFlushPackets(boolean flushPackets)
public void close() throws java.io.IOException
java.io.IOException
public boolean isUseBufferedStreams()
public void setUseBufferedStreams(boolean useBufferedStreams)
useBufferedStreams
- the useBufferedStreams to setpublic java.beans.PropertyChangeSupport getSupport()
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |