public class Proxy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ProxyClientSessions |
listOfClientSessions |
private CADILog |
log
It is an object that will be used to log the server process
|
private boolean |
logEnabled
Indicates whether the log is enabled or disabled.
|
private java.lang.String |
logFile
It is the file name where the server logs are stored.
|
private long |
maxTxRate |
private float[] |
movementProbabilities
Definition in
CADI.Proxy.Core.Movements . |
private int |
numOfWorkers
Indicates the number of threads of the
Worker that will
be running. |
private int[] |
ports
Ports where the server is listening to the client requests.
|
private java.lang.String |
predictiveModel
Is the path where semantic files are located.
|
private int |
prefetchingDataHistory |
private int |
prefetchingWOIType |
private ProxyPrefSemaphore |
proxyMutex
Obs: the name of the object is not appropriate.
|
private ProxyPrefetching |
proxyPrefetching |
private ProxySessionTargets |
proxySessionTargets
Is the proxy's cache where the logical targets will be cached.
|
private int |
proxyType
Indicates the type of proxy that will be used.
|
private RequestListener[] |
requestListenersPool
This thread pool will listen to in a port to receive client requests.
|
private RequestQueue |
requestQueue
It is a queue where the client request are stored.
|
private int |
trafficShaping |
private ProxyWorker[] |
workersPool
This thread pool will process the client requests and will send the
server responses to the client.
|
private boolean |
XMLLogFormat
Indicates whether the log information is stored in XML format or simple
text format.
|
Constructor and Description |
---|
Proxy(int proxyType,
int[] ports,
int numOfWorkers,
boolean logEnabled,
int logLevel,
java.lang.String logFile,
boolean XMLLogFormat)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
launchListeners()
This method creates and launches the proxy listeners.
|
private void |
launchProxyPrefetching()
This method creates and launches the proxy prefetching module.
|
private void |
launchProxyWorkers()
This method creates and launches the proxy workers.
|
void |
list(java.io.PrintStream out)
Prints this Proxy out to the specified output stream.
|
void |
run() |
void |
setMaxTxRate(long maxTxRate)
Sets the
maxTxRate attribute. |
void |
setMovementProbabilities(float[] movProbs) |
void |
setPredictiveModel(java.lang.String predModel) |
void |
setPrefetchingDataHistory(int prefetchingDataHistory)
Sets the
prefetchingDataHistory attribute. |
void |
setPrefetchingWOIType(int prefetchingWOIType)
Sets the
prefetchingWOIType attribute. |
void |
setProxyType(int proxyType)
Sets the
proxyType attribute. |
void |
setTrafficShaping(int trafficShaping)
Sets the
trafficShaping attribute. |
java.lang.String |
toString() |
private int proxyType
Further information, see ProxyDefaultValues.PROXY_TYPE
.
private int prefetchingDataHistory
private int prefetchingWOIType
private int[] ports
private int numOfWorkers
Worker
that will
be running.private long maxTxRate
private int trafficShaping
private java.lang.String logFile
private boolean XMLLogFormat
private boolean logEnabled
private float[] movementProbabilities
CADI.Proxy.Core.Movements
.private java.lang.String predictiveModel
private RequestListener[] requestListenersPool
private RequestQueue requestQueue
private ProxyWorker[] workersPool
private ProxyPrefetching proxyPrefetching
private CADILog log
private ProxySessionTargets proxySessionTargets
private ProxyClientSessions listOfClientSessions
private ProxyPrefSemaphore proxyMutex
public Proxy(int proxyType, int[] ports, int numOfWorkers, boolean logEnabled, int logLevel, java.lang.String logFile, boolean XMLLogFormat)
ports
- numOfWorkers
- logEnabled
- logLevel
- logFile
- XMLLogFormat
- public void setProxyType(int proxyType)
proxyType
attribute.proxyType
- definition in proxyType
.public void setPrefetchingDataHistory(int prefetchingDataHistory)
prefetchingDataHistory
attribute.prefetchingModel
- definition in prefetchingDataHistory
.public void setPrefetchingWOIType(int prefetchingWOIType)
prefetchingWOIType
attribute.woiExtension
- definition in prefetchingWOIType
.public void setMaxTxRate(long maxTxRate)
maxTxRate
attribute.maxTxRate
- definition in maxTxRate
attribute.public void setTrafficShaping(int trafficShaping)
trafficShaping
attribute.maxTxRate
- definition in trafficShaping
attribute.public void setMovementProbabilities(float[] movProbs)
public void setPredictiveModel(java.lang.String predModel)
public void run()
public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.private void launchListeners() throws ErrorException
ErrorException
private void launchProxyWorkers()
private void launchProxyPrefetching()
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)