1 9 package org.jboss.remoting.network.filter; 10 11 import org.jboss.remoting.InvokerLocator; 12 import org.jboss.remoting.ident.Identity; 13 import org.jboss.remoting.network.NetworkFilter; 14 15 22 public class InvokerProtocolFilter implements NetworkFilter 23 { 24 static final long serialVersionUID = -4175168615629564295L; 25 26 private final String protocol; 27 28 public InvokerProtocolFilter(String protocol) 29 { 30 this.protocol = protocol; 31 } 32 33 40 public boolean filter(Identity identity, InvokerLocator locators[]) 41 { 42 if(locators != null) 43 { 44 for(int c = 0; c < locators.length; c++) 45 { 46 if(locators[c].getProtocol().equalsIgnoreCase(protocol)) 48 { 49 return true; 50 } 51 } 52 } 53 return false; 54 } 55 } 56 | Popular Tags |