Publishes the provided {@link Artwork} object. This will be sent to all current subscribers
and to all future subscribers, until a new artwork is published.

@param artwork the artwork to publish.
970607
protected final void publishArtwork(@NonNull Artwork artwork) {
        artwork.setComponentName(new ComponentName(this, getClass()));
        mCurrentState.setCurrentArtwork(artwork);
        mServiceHandler.removeCallbacks(mPublishStateRunnable);
        mServiceHandler.post(mPublishStateRunnable);
    }
602654
public void setImageUI(final BufferedImage image) {
		BoofSwingUtil.invokeNowOrLater(() -> {
			repaintJustImage(ImagePanel.this.img,adjustmentGUI);
			ImagePanel.this.img = image;
			repaintJustImage(ImagePanel.this.img,adjustmentGUI);
		});
	}
558151
public void setAsset(com.google.api.ads.admanager.axis.v201808.CreativeAsset asset) {
        this.asset = asset;
    }
36345
public static void printAvailableImage(final Image image) {
        final Subscription subscription = image.subscription();
        System.out.println(String.format("Available image on %s streamId=%d sessionId=%d from %s",
                        subscription.channel(), subscription.streamId(), image.sessionId(), image.sourceIdentity()));
    }
903866
public void setImage(final Image image) {
		ButtonModel model = getOrCreateComponentModel();
		model.image = image;
		model.imageUrl = null;
	}
872582
private void loadArtwork(final Context context, final String artworkUrl) {
        mMainThreadHandler.post(new Runnable() {
            @Override
            public void run() {
                final Picasso picasso = Picasso.with(context);
                picasso.cancelRequest(mMediaSessionArtworkTarget);
                picasso.load(artworkUrl)
                        .centerCrop()
                        .resize(MEDIA_SESSION_ARTWORK_SIZE, MEDIA_SESSION_ARTWORK_SIZE)
                        .into(mMediaSessionArtworkTarget);
            }
        });
    }
950518
public void setImage(Resource resource)
    {
        ImageIcon image = null;
        if (resource != null && resource.exists())
        {
            try
            {
                image = new ImageIcon(resource.getURL());
            }
            catch (IOException e)
            {
                logger.warn("Error reading resource: " + resource);
                throw new RuntimeException("Error reading resource " + resource, e);
            }
        }
        setImage(image);
    }
109912
public static void writePng(Image image, OutputStream out) throws IORuntimeException {
		write(image, IMAGE_TYPE_PNG, out);
	}
765459
@Override
  protected void publishData(WorkUnitState state, int branchId, boolean publishSingleTaskData,
      Set<Path> writerOutputPathsMoved) throws IOException {
    Path publisherOutputDir = getPublisherOutputDir(state, branchId);
    if (!this.publisherFileSystemByBranches.get(branchId).exists(publisherOutputDir)) {
      WriterUtils.mkdirsWithRecursivePermissionWithRetry(this.publisherFileSystemByBranches.get(branchId),
          publisherOutputDir, this.permissions.get(branchId), this.retrierConfig);
    }
    super.publishData(state, branchId, publishSingleTaskData, writerOutputPathsMoved);
  }
1206534
public void setArtist(String newArtist)
	{
		if (newArtist.length() > ARTIST_SIZE)
		{
			artist = newArtist.substring(0, ARTIST_SIZE);
		}
		else
		{
			artist = newArtist;
		}
	}
209073
protected void publishInternal(final RegisteredService service, final ApplicationEvent event) {

        if (event instanceof CasRegisteredServiceDeletedEvent) {
            handleCasRegisteredServiceDeletedEvent(service, event);
            return;
        }
        if (event instanceof CasRegisteredServiceSavedEvent || event instanceof CasRegisteredServiceLoadedEvent) {
            handleCasRegisteredServiceUpdateEvents(service, event);
            return;
        }
        LOGGER.warn("Unsupported event [{}} for service replication", event);
    }
580897
public void setImage(java.lang.String image) {
        getStateHelper().put(PropertyKeys.image, image);
    }
1359585
public <E extends Event> void publish(E event) {
        if (!eventListenerMap.isEmpty()) {
            EventListener<E> eventListener = getEventListener(event);
            if (eventListener != null) {
                eventListener.on(event);
            }
        }
    }
641752
@Override
	public void publish(Event event) {

		// Connected
		if (event instanceof ConnectedEvent) {
			if (status.compareAndSet(STATUS_CONNECTING_1, STATUS_CONNECTING_2)) {

				// First connection is Ok
				return;
			}
			if (status.compareAndSet(STATUS_CONNECTING_2, STATUS_CONNECTED)) {

				// Second connection is Ok
				logger.info("All Redis pub-sub connections estabilished.");
				connected(false);
			}
			return;
		}

		// Disconnected
		if (event instanceof DisconnectedEvent) {
			int s = status.getAndSet(STATUS_DISCONNECTED);
			if (s != STATUS_DISCONNECTED && s != STATUS_DISCONNECTING) {
				logger.info("Redis pub-sub connection aborted.");
				reconnect();
			}
		}

	}
1008130
@Override
  public <T> T publish(Class<T> beanType, Object id, Transaction transaction) {
    methodCalls.add(MethodCall.of(PUBLISH).with("beanType", beanType).with("id", id));
    return !persistPublish ? null : publish.publish(beanType, id, transaction);
  }
740675
@Override
    public List<FTArtwork> getArtwork(FTArtworkType artworkType) {
        if (artwork.containsKey(artworkType)) {
            return artwork.get(artworkType);
        }
        return Collections.emptyList();
    }
148790
public void setImage(final Image image) {
		ImageModel model = getOrCreateComponentModel();
		model.image = image;
		model.imageUrl = null;
	}