|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmedia.sdk.java.examples.SimpleConnector
media.sdk.java.examples.SimpleMediaServer
Implements a simple server application that reads the content of a source directory. When parsing the directory, it creates a thread for processing each file. Each thread creates a MILInteraction, adds the file as attached data to the interaction, submits the interaction, and deletes the file from the source directory.
| Field Summary | |
java.lang.String |
interactionSubtype
The interaction subtype for interactions to be submitted. |
java.lang.String |
interactionType
The interaction type for interactions to be submitted. |
java.lang.String |
mediaType
The media type for interactions to be submitted. |
java.lang.String |
queueName
The queue name to which media interactions are submitted. |
| Fields inherited from class media.sdk.java.examples.SimpleConnector |
connector |
| Constructor Summary | |
SimpleMediaServer(java.lang.String queue_name,
java.lang.String media_type,
java.lang.String interaction_type,
java.lang.String interaction_subtype,
java.lang.String source_path,
java.lang.String save_path,
boolean custom)
Constructor. |
|
| Method Summary | |
protected java.lang.String |
createTimeStamp()
Returns a timestamp for log messages. |
void |
getSourceFiles()
Reads the content of the sourcePath directory. |
long |
incrementID()
Synchronized method that manages interaction IDs. |
void |
processFileList()
Creates a thread for processing each file found in the filesToSend list. |
void |
run()
This method periodically reads the source directory and process the file list. |
void |
stop()
Stops the server and properly release factories. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.lang.String queueName
public java.lang.String mediaType
public java.lang.String interactionType
public java.lang.String interactionSubtype
| Constructor Detail |
public SimpleMediaServer(java.lang.String queue_name,
java.lang.String media_type,
java.lang.String interaction_type,
java.lang.String interaction_subtype,
java.lang.String source_path,
java.lang.String save_path,
boolean custom)
queue_name - queue name to which media interactions are submitted.media_type - media type possible values are defined in the Configuration Layer as "Media Type" attribute values.interaction_type - interaction type; possible values are defined in the Configuration Layer as "Interaction Type" attribute values.interaction_subtype - interaction subtype; possible values are defined in the Configuration Layer as "Interaction Type" attribute values.source_path - source directory containing input files to attach to the created interactions.save_path - directory in which to save files for which interaction creation failed.| Method Detail |
public long incrementID()
public void run()
run in interface java.lang.Runnablepublic void getSourceFiles()
sourcePath directory.
public void processFileList()
public void stop()
stop in class SimpleConnectorprotected java.lang.String createTimeStamp()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||