Returns a given protocol or null if not found
(String name)
| 668 | |
| 669 | /** Returns a given protocol or null if not found */ |
| 670 | public <T extends Protocol> T findProtocol(String name) { |
| 671 | T tmp=(T)top_prot; |
| 672 | String prot_name; |
| 673 | while(tmp != null) { |
| 674 | prot_name=tmp.getName(); |
| 675 | if(Objects.equals(prot_name, name)) |
| 676 | return tmp; |
| 677 | tmp=tmp.getDownProtocol(); |
| 678 | } |
| 679 | return null; |
| 680 | } |
| 681 | |
| 682 | public <T extends Protocol> List<T> findProtocols(String regexp) { |
| 683 | List<T> retval=null; |