ruper2/src/java/core/org/krysalis/ruper2/util/net/select ProtocolVrlSelector.java,NONE,1.1

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/util/net/select
In directory sc8-pr-cvs1:/tmp/cvs-serv15892/src/java/core/org/krysalis/ruper2/util/net/select

Added Files:
	ProtocolVrlSelector.java 
Log Message:
1) Added the GumpTool [need to make it generic some time]
2) Forced VFSProvider to load VFS classes during construction, so we know early if they are missing & try soemthing else.
3) Started a VRLProtocol selector, so we can ignore links we cannot download.

--- NEW FILE: ProtocolVrlSelector.java ---
/*
 * Created on Sep 4, 2003
 */
package org.krysalis.ruper2.util.net.select;

import java.util.Set;

import org.krysalis.ruper2.util.net.VirtualResourceLocator;
import org.krysalis.ruper2.util.text.MessageConstants;
import org.krysalis.ruper2.util.text.Messages;

/**
 * @author arb_jack
 */
public class ProtocolVrlSelector extends AbstractVrlSelector {
	Set m_protocols = null;

	
	/**
	 * @param expression
	 */
	public ProtocolVrlSelector(Set protocols) {
		super(Messages.getString(MessageConstants.PROTOCOL_VRL_SELECTOR));

		m_protocols = protocols;
	}

	public boolean selectVrl(VirtualResourceLocator vrl) {
		return m_protocols.contains(vrl.getProtocol());
	}

	public String toString() {
		return super.toString() + ":" + m_protocols;
	}
}




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.