Class CommandSender<C extends CommandReceiver>
- java.lang.Object
-
- com.levigo.jadice.server.msoffice.CommandSender<C>
-
public final class CommandSender<C extends CommandReceiver> extends Object
-
-
Constructor Summary
Constructors Constructor Description CommandSender(Class<C> converterClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finalize()
Class<C>
getConverterClass()
CountDownLatch
getLatch()
Collection<Integer>
getPotentialSubProcessIDs()
List<File>
getResults()
void
initException(Exception e)
Set an initial exception, but does not overwrite an existing one.boolean
isAlive()
boolean
isDebug()
protected void
sendCommand(String message)
protected void
sendCommand(String message, String param)
void
setDebug(boolean enable)
void
shutdown()
protected Process
startConverter(Class<C> converterClass)
List<File>
work(File inputFile)
List<File>
work(File inputFile, String targetMimeType)
List<File>
work(File inputFile, String targetMimeType, Map<String,String> conversionProperties)
-
-
-
Constructor Detail
-
CommandSender
public CommandSender(Class<C> converterClass) throws IOException
- Throws:
IOException
-
-
Method Detail
-
work
public final List<File> work(File inputFile, String targetMimeType) throws Exception
- Throws:
Exception
-
work
public final List<File> work(File inputFile, String targetMimeType, Map<String,String> conversionProperties) throws Exception
- Throws:
Exception
-
getLatch
public CountDownLatch getLatch()
-
initException
public void initException(Exception e)
Set an initial exception, but does not overwrite an existing one. null as parameter resets that value- Parameters:
e
-
-
shutdown
public final void shutdown()
-
getPotentialSubProcessIDs
public Collection<Integer> getPotentialSubProcessIDs()
- Returns:
- all PIDs that might be a subprocess of this MS Office converter
-
sendCommand
protected final void sendCommand(String message) throws IOException
- Throws:
IOException
-
sendCommand
protected final void sendCommand(String message, String param) throws IOException
- Throws:
IOException
-
startConverter
protected Process startConverter(Class<C> converterClass) throws IOException
- Throws:
IOException
-
isAlive
public boolean isAlive()
-
setDebug
public void setDebug(boolean enable)
-
isDebug
public boolean isDebug()
-
finalize
protected void finalize() throws Throwable
-
-