|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.net.ContentHandler
org.eclipse.osgi.framework.internal.protocol.ContentHandlerProxy
public class ContentHandlerProxy
The ContentHandlerProxy is a ContentHandler that acts as a proxy for registered ContentHandlers. When a ContentHandler is requested from the ContentHandlerFactory and it exists in the service registry, a ContentHandlerProxy is created which will pass all the requests from the requestor to the real ContentHandler. We can't return the real ContentHandler from the ContentHandlerFactory because the JVM caches ContentHandlers and therefore would not support a dynamic environment of ContentHandlers being registered and unregistered.
Field Summary | |
---|---|
protected ServiceReference |
contentHandlerServiceReference
|
protected ServiceTracker |
contentHandlerServiceTracker
|
protected java.lang.String |
contentType
|
protected BundleContext |
context
|
protected int |
ranking
|
protected java.net.ContentHandler |
realHandler
|
Constructor Summary | |
---|---|
ContentHandlerProxy(java.lang.String contentType,
ServiceReference reference,
BundleContext context)
|
Method Summary | |
---|---|
java.lang.Object |
addingService(ServiceReference reference)
A service is being added to the ServiceTracker object. |
java.lang.Object |
getContent(java.net.URLConnection uConn)
|
void |
modifiedService(ServiceReference reference,
java.lang.Object service)
A service tracked by the ServiceTracker object has been
modified. |
void |
removedService(ServiceReference reference,
java.lang.Object service)
A service tracked by the ServiceTracker object has been
removed. |
Methods inherited from class java.net.ContentHandler |
---|
getContent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.net.ContentHandler realHandler
protected ServiceTracker contentHandlerServiceTracker
protected BundleContext context
protected ServiceReference contentHandlerServiceReference
protected java.lang.String contentType
protected int ranking
Constructor Detail |
---|
public ContentHandlerProxy(java.lang.String contentType, ServiceReference reference, BundleContext context)
Method Detail |
---|
public java.lang.Object addingService(ServiceReference reference)
ServiceTrackerCustomizer
ServiceTracker
object.
This method is called before a service which matched the search
parameters of the ServiceTracker
object is added to it.
This method should return the service object to be tracked for this
ServiceReference
object. The returned service object is
stored in the ServiceTracker
object and is available from
the getService
and getServices
methods.
addingService
in interface ServiceTrackerCustomizer
reference
- Reference to service being added to the
ServiceTracker
object.
ServiceReference
object or null
if
the ServiceReference
object should not be tracked.ServiceTrackerCustomizer.addingService(ServiceReference)
public void modifiedService(ServiceReference reference, java.lang.Object service)
ServiceTrackerCustomizer
ServiceTracker
object has been
modified.
This method is called when a service being tracked by the
ServiceTracker
object has had it properties modified.
modifiedService
in interface ServiceTrackerCustomizer
reference
- Reference to service that has been modified.service
- The service object for the modified service.ServiceTrackerCustomizer.modifiedService(ServiceReference, Object)
public void removedService(ServiceReference reference, java.lang.Object service)
ServiceTrackerCustomizer
ServiceTracker
object has been
removed.
This method is called after a service is no longer being tracked by the
ServiceTracker
object.
removedService
in interface ServiceTrackerCustomizer
reference
- Reference to service that has been removed.service
- The service object for the removed service.ServiceTrackerCustomizer.removedService(ServiceReference, Object)
public java.lang.Object getContent(java.net.URLConnection uConn) throws java.io.IOException
getContent
in class java.net.ContentHandler
java.io.IOException
ContentHandler.getContent(URLConnection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |