org.foray.common.url
Class AbstractProtocolRegistration

java.lang.Object
  extended by org.foray.common.url.AbstractProtocolRegistration
All Implemented Interfaces:
ProtocolRegistrationStrategy
Direct Known Subclasses:
FactoryProtocolRegistration, PropertyProtocolRegistration

public abstract class AbstractProtocolRegistration
extends Object
implements ProtocolRegistrationStrategy

Abstract implementation of ProtocolRegistrationStrategy.


Constructor Summary
AbstractProtocolRegistration()
          Constructor.
 
Method Summary
 void registerProtocolHandler(String protocol, URLStreamHandler handler)
          Registers a URLStreamHandler for the given protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.foray.common.url.ProtocolRegistrationStrategy
getURLStreamHandler
 

Constructor Detail

AbstractProtocolRegistration

public AbstractProtocolRegistration()
Constructor.

Method Detail

registerProtocolHandler

public void registerProtocolHandler(String protocol,
                                    URLStreamHandler handler)
Description copied from interface: ProtocolRegistrationStrategy
Registers a URLStreamHandler for the given protocol. When implemented, this method should be synchronized. If a handler already exists for the given protocol, this method does nothing.

Specified by:
registerProtocolHandler in interface ProtocolRegistrationStrategy
Parameters:
protocol - The protocol to be registered.
handler - The URLStreamHandler instance which should be used for URLs whose protocol is protocol.


Copyright © 2017. All rights reserved.