|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.w3c.www.protocol.http.micp.MICPFilter
Field Summary | |
protected java.net.InetAddress |
addr
Our multicast group address. |
static java.lang.String |
ADDRESS_P
Properties - Our multicast group address. |
protected CacheFilter |
cache
The CacheFilter we are working for. |
protected boolean |
debug
Our we in debug mode ? |
static java.lang.String |
DEBUG_P
Properties - Our debug flag. |
static java.lang.String |
DISABLE_CACHE_P
Properties - disable caching when fetching from a neighbour proxy. |
protected boolean |
disableCache
Should we disablecaching when fetching through a proxy ? |
protected byte[] |
localaddr
Our local internet address as a byte array. |
protected byte[] |
localproxy
Our local proxy address, in a byte array. |
protected long |
localsrc
Our local internet address, as a long. |
static java.lang.String |
PORT_P
Properties - Our own UDP port number. |
protected ObservableProperties |
props
The properties we are initialized from. |
static java.lang.String |
PROXY_P
Properties - location of proxy to redirect to (if success) |
protected java.net.MulticastSocket |
socket
Our socket to the group. |
static java.lang.String |
STATE_HOW
State - To mark requests that have been redirected. |
static java.lang.String |
TIMEOUT_P
Properties - Our default timeout value. |
protected long |
timeoutValue
Our default timeout value for waiting for replies (in ms). |
protected int |
ttl
Our TTL for writing packets. |
protected java.util.Vector |
waiters
Queue of threads waiting for some replies. |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Fields inherited from interface org.w3c.www.protocol.http.micp.MICP |
MICP_OP_QUERY,
MICP_OP_REPLY,
MICP_VERSION |
Constructor Summary | |
MICPFilter()
|
Method Summary | |
protected org.w3c.www.protocol.http.micp.ReplyWaiter |
addWaiter(int id)
|
boolean |
exceptionFilter(Request request,
HttpException ex)
This filter doesn't handle exceptions. |
protected void |
handle(byte[] buf,
int len)
Parse and handle the given MICP packet. |
Reply |
ingoingFilter(Request request)
Our ingoingFilter method. |
void |
initialize(HttpManager manager)
Initialize the ICP filter. |
protected int |
locateProxy(java.net.URL u)
Locate some proxy for the given URL. |
protected org.w3c.www.protocol.http.micp.ReplyWaiter |
lookupWaiter(int id)
|
Reply |
outgoingFilter(Request request,
Reply reply)
Our outgoingFilter does nothing (at all). |
boolean |
propertyChanged(java.lang.String name)
The callback method, invoked when any property change occurs. |
protected void |
removeWaiter(org.w3c.www.protocol.http.micp.ReplyWaiter w)
|
void |
run()
|
void |
sync()
This filter doesn't maintain dynamic state. |
java.net.URL |
waitOn(int id)
Wait for the reply on this reqiest identifier. |
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String STATE_HOW
public static final java.lang.String DEBUG_P
public static final java.lang.String ADDRESS_P
public static final java.lang.String PORT_P
public static final java.lang.String TIMEOUT_P
public static final java.lang.String DISABLE_CACHE_P
public static final java.lang.String PROXY_P
protected ObservableProperties props
protected CacheFilter cache
protected long timeoutValue
protected boolean debug
protected boolean disableCache
protected java.util.Vector waiters
protected java.net.InetAddress addr
protected byte[] localproxy
protected long localsrc
protected byte[] localaddr
protected java.net.MulticastSocket socket
protected int ttl
Constructor Detail |
public MICPFilter()
Method Detail |
protected final org.w3c.www.protocol.http.micp.ReplyWaiter lookupWaiter(int id)
protected final void removeWaiter(org.w3c.www.protocol.http.micp.ReplyWaiter w)
protected final org.w3c.www.protocol.http.micp.ReplyWaiter addWaiter(int id)
public java.net.URL waitOn(int id)
protected void handle(byte[] buf, int len) throws java.io.IOException
buf
- The packet.len
- Total length of packet.protected int locateProxy(java.net.URL u) throws java.io.IOException
u
- The URL to locate.public boolean propertyChanged(java.lang.String name)
name
- The name of the property that changed.public boolean exceptionFilter(Request request, HttpException ex)
request
- The request that triggered the exception.ex
- The triggered exception.public Reply ingoingFilter(Request request)
If a hit reply is received, we then use the corresponding proxy to fullfill the request.
request
- The request that is about to be emitted.public Reply outgoingFilter(Request request, Reply reply)
request
- The request that has been processed.reply
- The original reply (from origin server)public void sync()
public void run()
public void initialize(HttpManager manager) throws PropRequestFilterException
manager
- The HTTP manager.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |