/** * Used by setAdapter and it removes the old adapter of the destination * and adds the new adapter. * * @param adapter The adapter for the destination. */ private void addAdapter(ServiceAdapter adapter) { removeAdapter(); this.adapter = adapter; if (adapter.getDestination() == null || adapter.getDestination() != this) adapter.setDestination(this); }
/** * Used by setAdapter and it removes the old adapter of the destination * and adds the new adapter. * * @param adapter The adapter for the destination. */ private void addAdapter(ServiceAdapter adapter) { removeAdapter(); this.adapter = adapter; if (adapter.getDestination() == null || adapter.getDestination() != this) adapter.setDestination(this); }
/** * Used by setAdapter and it removes the old adapter of the destination * and adds the new adapter. * * @param adapter The adapter for the destination. */ private void addAdapter(ServiceAdapter adapter) { removeAdapter(); this.adapter = adapter; if (adapter.getDestination() == null || adapter.getDestination() != this) { adapter.setDestination(this); } }
/** * Sets the <code>Destination</code> of the <code>ServiceAdapter</code>. * Also sets the <code>ServiceAdapter</code> of the <code>Destination</code> * if needed. * * @param destination The <code>Destination</code> of the <code>ServiceAdapter</code>. */ public void setDestination(Destination destination) { Destination oldDestination = getDestination(); setParent(destination); if (oldDestination != null) oldDestination.setAdapter(null); // Set destination's adapter if needed if (destination.getAdapter() != this) { destination.setAdapter(this); } }
/** * Sets the <code>Destination</code> of the <code>ServiceAdapter</code>. * Also sets the <code>ServiceAdapter</code> of the <code>Destination</code> * if needed. * * @param destination The <code>Destination</code> of the <code>ServiceAdapter</code>. */ public void setDestination(Destination destination) { Destination oldDestination = getDestination(); setParent(destination); if (oldDestination != null) oldDestination.setAdapter(null); // Set destination's adapter if needed if (destination.getAdapter() != this) { destination.setAdapter(this); } }
/** * Sets the <code>Destination</code> of the <code>ServiceAdapter</code>. * Also sets the <code>ServiceAdapter</code> of the <code>Destination</code> * if needed. * * @param destination The <code>Destination</code> of the <code>ServiceAdapter</code>. */ public void setDestination(Destination destination) { Destination oldDestination = getDestination(); setParent(destination); if (oldDestination != null) oldDestination.setAdapter(null); // Set destination's adapter if needed if (destination.getAdapter() != this) { destination.setAdapter(this); } }
/** * Stops the <code>ServiceAdapter</code>. * If subclasses override, they must call <code>super.start()</code>. * */ public void stop() { if (!isStarted()) { return; } super.stop(); // Remove management if (isManaged() && getDestination().isManaged()) { if (getControl() != null) { getControl().unregister(); setControl(null); } setManaged(false); } }
/** * Stops the <code>ServiceAdapter</code>. * If subclasses override, they must call <code>super.start()</code>. * */ public void stop() { if (!isStarted()) { return; } super.stop(); // Remove management if (isManaged() && getDestination().isManaged()) { if (getControl() != null) { getControl().unregister(); setControl(null); } setManaged(false); } }
/** * Stops the <code>ServiceAdapter</code>. * If subclasses override, they must call <code>super.start()</code>. * */ public void stop() { if (!isStarted()) { return; } super.stop(); // Remove management if (isManaged() && getDestination().isManaged()) { if (getControl() != null) { getControl().unregister(); setControl(null); } setManaged(false); } }
Destination destination = getDestination(); if (!destination.isStarted())
Destination destination = getDestination(); if (!destination.isStarted())
Destination destination = getDestination(); if (!destination.isStarted())