|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
ppt.ImageServer
public class ImageServer
The ImageServer class is a stand alone application which opens socket, listens for a new client connection. The client is added to a list when connected. The server gets notified upon each PNG file creation in file system where Power Point Capture Show add-in stores slide as an image. The server streams the image file to currently connected clients.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
(package private) static java.util.List |
clients
|
(package private) java.awt.image.BufferedImage |
currentImage
|
(package private) static org.apache.log4j.Logger |
logger
|
(package private) static int |
port
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ImageServer()
|
Method Summary | |
---|---|
void |
fileCreated(int wd,
java.lang.String rootPath,
java.lang.String name)
The method reads newly created file from file system and assigns it to list of clients - ImageStreamer objects |
void |
fileDeleted(int wd,
java.lang.String rootPath,
java.lang.String name)
|
void |
fileModified(int wd,
java.lang.String rootPath,
java.lang.String name)
|
void |
fileRenamed(int wd,
java.lang.String rootPath,
java.lang.String oldName,
java.lang.String newName)
|
static void |
main(java.lang.String[] args)
|
void |
run()
|
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 |
Field Detail |
---|
static org.apache.log4j.Logger logger
static int port
static java.util.List clients
java.awt.image.BufferedImage currentImage
Constructor Detail |
---|
public ImageServer()
Method Detail |
---|
public static void main(java.lang.String[] args)
args:
- IMG_DIR and SENDER_PORT arguments can be sentpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
The metnod initializes client list, opens socket, and listens for
a new client connection
public void fileCreated(int wd, java.lang.String rootPath, java.lang.String name)
fileCreated
in interface net.contentobjects.jnotify.JNotifyListener
JNotifyListener.fileCreated(int, java.lang.String, java.lang.String)
public void fileDeleted(int wd, java.lang.String rootPath, java.lang.String name)
fileDeleted
in interface net.contentobjects.jnotify.JNotifyListener
public void fileModified(int wd, java.lang.String rootPath, java.lang.String name)
fileModified
in interface net.contentobjects.jnotify.JNotifyListener
public void fileRenamed(int wd, java.lang.String rootPath, java.lang.String oldName, java.lang.String newName)
fileRenamed
in interface net.contentobjects.jnotify.JNotifyListener
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |