org.openrdf.http.object.client
Class HTTPObjectClient
java.lang.Object
org.openrdf.http.object.client.HTTPObjectClient
- All Implemented Interfaces:
- HTTPService, HTTPObjectAgentMXBean
public class HTTPObjectClient
- extends Object
- implements HTTPService, HTTPObjectAgentMXBean
Manages the connections and cache for outgoing requests.
- Author:
- James Leigh
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_NAME
protected static final String DEFAULT_NAME
getInstance
public static HTTPObjectClient getInstance()
throws IOException
- Throws:
IOException
setInstance
public static void setInstance(File dir,
int maxCapacity)
throws Exception
- Throws:
Exception
getName
public String getName()
- Specified by:
getName in interface HTTPObjectAgentMXBean
setName
public void setName(String agent)
- Specified by:
setName in interface HTTPObjectAgentMXBean
getEnvelopeType
public String getEnvelopeType()
setEnvelopeType
public void setEnvelopeType(String type)
throws MimeTypeParseException
- Throws:
MimeTypeParseException
setProxy
public HTTPService setProxy(InetSocketAddress destination,
HTTPService proxy)
removeProxy
public boolean removeProxy(InetSocketAddress destination,
HTTPService proxy)
isCacheAggressive
public boolean isCacheAggressive()
- Specified by:
isCacheAggressive in interface HTTPObjectAgentMXBean
isCacheDisconnected
public boolean isCacheDisconnected()
- Specified by:
isCacheDisconnected in interface HTTPObjectAgentMXBean
isCacheEnabled
public boolean isCacheEnabled()
- Specified by:
isCacheEnabled in interface HTTPObjectAgentMXBean
setCacheAggressive
public void setCacheAggressive(boolean cacheAggressive)
- Specified by:
setCacheAggressive in interface HTTPObjectAgentMXBean
setCacheDisconnected
public void setCacheDisconnected(boolean cacheDisconnected)
- Specified by:
setCacheDisconnected in interface HTTPObjectAgentMXBean
setCacheEnabled
public void setCacheEnabled(boolean cacheEnabled)
- Specified by:
setCacheEnabled in interface HTTPObjectAgentMXBean
getCacheCapacity
public int getCacheCapacity()
- Specified by:
getCacheCapacity in interface HTTPObjectAgentMXBean
setCacheCapacity
public void setCacheCapacity(int capacity)
- Specified by:
setCacheCapacity in interface HTTPObjectAgentMXBean
getCacheSize
public int getCacheSize()
- Specified by:
getCacheSize in interface HTTPObjectAgentMXBean
invalidateCache
public void invalidateCache()
throws IOException,
InterruptedException
- Specified by:
invalidateCache in interface HTTPObjectAgentMXBean
- Throws:
IOException
InterruptedException
resetCache
public void resetCache()
throws IOException,
InterruptedException
- Specified by:
resetCache in interface HTTPObjectAgentMXBean
- Throws:
IOException
InterruptedException
getFrom
public String getFrom()
- Specified by:
getFrom in interface HTTPObjectAgentMXBean
setFrom
public void setFrom(String from)
- Specified by:
setFrom in interface HTTPObjectAgentMXBean
start
public void start()
- Specified by:
start in interface HTTPObjectAgentMXBean
isRunning
public boolean isRunning()
service
public org.apache.http.HttpResponse service(org.apache.http.HttpRequest request)
throws IOException,
GatewayTimeout
HttpEntity.consumeContent() or
HttpEntity.writeTo(java.io.OutputStream) must be called if
HttpResponse.getEntity() is non-null.
- Specified by:
service in interface HTTPService
- Throws:
IOException
GatewayTimeout
service
public org.apache.http.HttpResponse service(InetSocketAddress proxy,
org.apache.http.HttpRequest request)
throws IOException,
GatewayTimeout
HttpEntity.consumeContent() or
HttpEntity.writeTo(java.io.OutputStream) must be called if
HttpResponse.getEntity() is non-null.
- Throws:
IOException
GatewayTimeout
stop
public void stop()
throws Exception
- Specified by:
stop in interface HTTPObjectAgentMXBean
- Throws:
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy in interface HTTPObjectAgentMXBean
- Throws:
Exception
resetConnections
public void resetConnections()
throws IOException
- Specified by:
resetConnections in interface HTTPObjectAgentMXBean
- Throws:
IOException
poke
public void poke()
- Specified by:
poke in interface HTTPObjectAgentMXBean
getStatus
public String getStatus()
- Specified by:
getStatus in interface HTTPObjectAgentMXBean
getConnections
public ConnectionBean[] getConnections()
- Specified by:
getConnections in interface HTTPObjectAgentMXBean
Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.