Initializes the protocol handler. @throws Exception if initialization fails
()
| 931 | * @throws Exception if initialization fails |
| 932 | */ |
| 933 | @Override |
| 934 | public void init() throws Exception { |
| 935 | if (getLog().isInfoEnabled()) { |
| 936 | getLog().info(sm.getString("abstractProtocolHandler.init", getName())); |
| 937 | logPortOffset(); |
| 938 | } |
| 939 | |
| 940 | if (oname == null) { |
| 941 | // Component not pre-registered so register it |
| 942 | oname = createObjectName(); |
| 943 | if (oname != null) { |
| 944 | Registry.getRegistry(null).registerComponent(this, oname, null); |
| 945 | } |
| 946 | } |
| 947 | |
| 948 | if (this.domain != null) { |
| 949 | ObjectName rgOname = new ObjectName(domain + ":type=GlobalRequestProcessor,name=" + getName()); |
| 950 | this.rgOname = rgOname; |
| 951 | Registry.getRegistry(null).registerComponent(getHandler().getGlobal(), rgOname, null); |
| 952 | } |
| 953 | |
| 954 | String endpointName = getName(); |
| 955 | endpoint.setName(endpointName.substring(1, endpointName.length() - 1)); |
| 956 | endpoint.setDomain(domain); |
| 957 | |
| 958 | endpoint.init(); |
| 959 | } |
| 960 | |
| 961 | |
| 962 | /** |
nothing calls this directly
no test coverage detected