Nuxeo Enterprise Platform 5.3

com.anwrt.ooserver.daemon
Class ProcessPool

java.lang.Object
  extended by com.anwrt.ooserver.daemon.ProcessPool

public class ProcessPool
extends Object

Pool of ready Open Office server instances

Author:
Jounayd Id Salah

Constructor Summary
ProcessPool(Config config)
          Just keeps some configuration for further initialization
 
Method Summary
 void append(OfficeProcess item)
          append an office process into the ready pool, at the end of the queue
 OfficeProcess[] getAll()
          Returns an array of all the office instances available, busy or not.
 String getStateString()
          returns "ready processes count / processes count"
 void initializationFinished()
          Initialization finished, we keep a reference to all processes in _all
 OfficeProcess pop()
          Gets the first ready process that entered the pool (also checks if it's responsive)
 int size()
          Number of ready processes
 void terminate()
          Ask all office process (ready or not) to terminate
 void waitTillReady()
          Wait until the process is ready and connected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessPool

public ProcessPool(Config config)
Just keeps some configuration for further initialization

Parameters:
config - any configuration
Method Detail

getAll

public OfficeProcess[] getAll()
Returns an array of all the office instances available, busy or not.

Returns:
process array

append

public void append(OfficeProcess item)
append an office process into the ready pool, at the end of the queue

Parameters:
item - the office process

initializationFinished

public void initializationFinished()
Initialization finished, we keep a reference to all processes in _all


size

public int size()
Number of ready processes

Returns:
-

terminate

public void terminate()
Ask all office process (ready or not) to terminate


pop

public OfficeProcess pop()
Gets the first ready process that entered the pool (also checks if it's responsive)

Returns:
a ready office process

waitTillReady

public void waitTillReady()
Wait until the process is ready and connected


getStateString

public String getStateString()
returns "ready processes count / processes count"

Returns:
an information string

Nuxeo Enterprise Platform 5.3

Copyright © 2010 Nuxeo SAS. All Rights Reserved.