public void bindSource(String serverItfName, Object clientItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException { List<Object> reverseBindingList = null; if (reverseBinding == null) { reverseBinding = new HashMap<String, List<Object>>(); } try { if (reverseBinding.containsKey(serverItfName)) { reverseBinding.get(serverItfName).add(clientItf); } else { reverseBindingList = new ArrayList<Object>(); reverseBindingList.add(clientItf); reverseBinding.put(serverItfName, reverseBindingList); } } catch (Exception e) { throw new IllegalBindingException(e.getMessage()); } }
String msg = "IllegalBindingException: "+e.getMessage(); throw new ChainedIllegalInterceptorException(e,itf,interceptor,msg);
String msg = "IllegalBindingException: "+e.getMessage(); throw new ChainedIllegalInterceptorException(e,itf,interceptor,msg);
@Override public void bindFc(final String s, final Object o) throws NoSuchInterfaceException, IllegalBindingException { if (s == null) { throw new IllegalArgumentException("Interface name can't be null"); } try { if (s.equals(LOADER_BINDING)) { this.clientLoader = (Loader) o; } else { throw new NoSuchInterfaceException("There is no interface named '" + s + "'"); } } catch (final RuntimeException e) { e.printStackTrace(); throw new IllegalBindingException( "Client interface type for interface named ' " + s + "' does not match reference type"); } }
/** * @see org.objectweb.fractal.api.control.BindingController#bindFc(java.lang.String, * java.lang.Object) */ public void bindFc(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException { if (clientItfName.equals(DELEGATE_CLIENT_ITF_NAME)) { if (!(Component.class.isAssignableFrom(serverItf.getClass()))) { throw new IllegalBindingException( ((("server interfaces connected to " + clientItfName) + " must be instances of ") + (Component.class .getName()))); } delegate = ((Component) (serverItf)); return; } if (clientItfName.equals(SERVANT_CLIENT_ITF_NAME)) { servant = serverItf; return; } throw new NoSuchInterfaceException( (("Client interface \'" + clientItfName) + "\' is undefined.")); }
public void bindFc(final String itfName, final Object value) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException { if (itfName == null) { throw new IllegalArgumentException("Interface name can't be null"); } try { if (itfName.equals(LOADER_ITF_NAME)) { this.loaderItf = (Loader) value; } else if (itfName.equals(DEPLOY_LOADER_ITF_NAME)) { this.deployLoaderItf = (Loader) value; } else if (itfName.equals(VISITOR_ITF_NAME)) { this.visitorItf = (DefinitionVisitor) value; } else if (itfName.equals(NODE_FACTORY_ITF_NAME)) { this.nodeFactoryItf = (XMLNodeFactory) value; } else { throw new NoSuchInterfaceException( "Unable to find the interface named '" + itfName + "'"); } } catch (final ClassCastException cce) { cce.printStackTrace(); throw new IllegalBindingException("Unmatching interface types"); } }
throw new IllegalBindingException( "Cannot find mapping for client interface '" + clientItfName + "'.");
throw new IllegalBindingException( "Cannot find mapping for client interface '" + clientItfName + "'.");