1 20 package org.apache.mina.integration.spring; 21 22 import org.apache.mina.common.IoFilter; 23 import org.springframework.beans.factory.InitializingBean; 24 import org.springframework.util.Assert; 25 26 51 public class IoFilterMapping implements InitializingBean { 52 private String name = null; 53 54 private IoFilter filter = null; 55 56 59 public IoFilterMapping() { 60 } 61 62 70 public IoFilterMapping(String name, IoFilter filter) { 71 Assert.notNull(name, "Argument 'name' may not be null"); 72 Assert.notNull(filter, "Argument 'filter' may not be null"); 73 74 this.name = name; 75 this.filter = filter; 76 } 77 78 83 public IoFilter getFilter() { 84 return filter; 85 } 86 87 92 public String getName() { 93 return name; 94 } 95 96 103 public void setFilter(IoFilter filter) { 104 Assert.notNull(filter, "Argument 'filter' may not be null"); 105 this.filter = filter; 106 } 107 108 115 public void setName(String name) { 116 Assert.notNull(name, "Argument 'name' may not be null"); 117 this.name = name; 118 } 119 120 public void afterPropertiesSet() throws Exception { 121 Assert.notNull(name, "Argument 'name' may not be null"); 122 Assert.notNull(filter, "Argument 'filter' may not be null"); 123 } 124 } 125 | Popular Tags |