|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.mobicents.slee.resource.lab.stack.RAFStack
public class RAFStack
RAFStack represents the core of the RAFrame resource adaptor.
It is a simple TCP/IP server socket, listening in a separate
Thread on incoming connections. Listening is terminated every
1000ms to react on incoming "shutdown" commands.
The socket connection starts on incoming connections a separate
Thread of type com.maretzke.raframe.stack.RAStackThread which
receives byte[] information (max. 2kb). The received information
of any kind is then published to the registered listeners. This
information is distributed as String.
The intention of the RAFStack is not to be very efficient or
effective - it is implemented to fulfill the requirements of a
simple to understand resource adaptor stack implementation which
almost everybody is familiar with and it does not cost too much
time to understand the message flows.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
RAFStack(int port,
java.lang.String remotehost,
int remoteport)
Create an instance of RAFStack. |
|
| Method Summary | |
|---|---|
void |
addListener(RAFStackListener listener)
|
void |
run()
|
void |
send(java.lang.String message)
Send a string message to a TCP/IP socket. |
void |
shutdown()
This method sets the flag to shut down the stack. |
| 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, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RAFStack(int port,
java.lang.String remotehost,
int remoteport)
throws java.io.IOException
port - the port number to listen onremotehost - the remotehost name the stack sends information toremoteport - the remotehost's port the stack sends information to
java.io.IOException| Method Detail |
|---|
public void addListener(RAFStackListener listener)
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void shutdown()
public void send(java.lang.String message)
message - the message to transport to the listening port
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||