|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.ut2004.utils.UCCWrapper
public class UCCWrapper
Wrapper of running instance of UCC server. Implements pooling of instances.
Usage scenario is:
UCCWrapper ucc = UCCWrapper.create();
...
ucc.release();
The location of UCC executabe will be determined by an environment variable
pogamut.ut2004.home (e.g. c:\Games\UT2004). The property cam be set via java ...
-Dpogamut.ut2004.home=c:\Games\UT2004. Another posibility is to set it
by code System.setProperty("pogamut.ut2004.home", "c:\\Unreal Anthology\\UT2004");
.
Nested Class Summary | |
---|---|
class |
UCCWrapper.ScannerSink
Scanns the output of UCC for some specific srings (Ports bounded. |
protected class |
UCCWrapper.StreamSink
Reads content of the stream and discards it. |
Field Summary | |
---|---|
protected static int |
basePort
First port assigned to a ucc instance. |
protected UCCWrapperConf |
conf
|
protected int |
controlPort
Port for server connection. |
protected static int |
fileCounter
|
protected cz.cuni.amis.utils.flag.Flag<Boolean> |
gameEnding
Tells whether UCC is in "IN END GAME" phase, which indicates that the FIRST MATCH has ended. |
protected int |
gbPort
Port for bots. |
protected static Integer |
nextUccWrapperUID
|
protected int |
observerPort
Port for observer connection. |
static long |
stamp
|
protected boolean |
stopped
Was this instance already released? |
protected LogCategory |
uccLog
Loger containing all output from running instance of UCC. |
protected int |
uccWrapperUID
ID of the wrapper object. |
protected IUT2004Server |
utServer
|
Constructor Summary | |
---|---|
UCCWrapper(UCCWrapperConf configuration)
|
Method Summary | |
---|---|
SocketConnectionAddress |
getBotAddress()
|
int |
getBotPort()
|
UCCWrapperConf |
getConfiguration()
|
int |
getControlPort()
|
cz.cuni.amis.utils.flag.Flag<Boolean> |
getGameEnding()
Returns flag that is indicating FIRST GAME end. |
String |
getHost()
|
Logger |
getLogger()
|
SocketConnectionAddress |
getObserverAddress()
|
int |
getObserverPort()
|
Process |
getProcess()
Process of the |
SocketConnectionAddress |
getServerAddress()
|
protected String |
getUnrealHome()
|
IUT2004Server |
getUTServer()
|
protected void |
initUCCWrapper()
|
void |
stop()
Stops the UCC server. |
protected void |
stopCheck()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LogCategory uccLog
protected static int fileCounter
protected int gbPort
protected int controlPort
protected int observerPort
protected IUT2004Server utServer
protected static final int basePort
protected static Integer nextUccWrapperUID
protected int uccWrapperUID
protected UCCWrapperConf conf
protected cz.cuni.amis.utils.flag.Flag<Boolean> gameEnding
UCCWrapperPatterns.getGameEndingPattern()
.
public static long stamp
protected boolean stopped
Constructor Detail |
---|
public UCCWrapper(UCCWrapperConf configuration) throws UCCStartException
UCCStartException
Method Detail |
---|
public Logger getLogger()
public UCCWrapperConf getConfiguration()
public IUT2004Server getUTServer()
protected String getUnrealHome()
protected void initUCCWrapper() throws UCCStartException
UCCStartException
public Process getProcess()
public void stop()
public int getBotPort()
public int getObserverPort()
public int getControlPort()
protected void stopCheck()
public String getHost()
public SocketConnectionAddress getBotAddress()
public SocketConnectionAddress getServerAddress()
public SocketConnectionAddress getObserverAddress()
public cz.cuni.amis.utils.flag.Flag<Boolean> getGameEnding()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |