org.apache.activemq.command.Message.getMessage()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中org.apache.activemq.command.Message.getMessage()方法的一些代码示例,展示了Message.getMessage()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getMessage()方法的具体详情如下:
包路径:org.apache.activemq.command.Message
类名称:Message
方法名:getMessage

Message.getMessage介绍

暂无

代码示例

代码示例来源:origin: apache/activemq

/** Sets the persistence mode
 * @see org.apache.activemq.broker.BrokerFilter#send(org.apache.activemq.broker.ProducerBrokerExchange, org.apache.activemq.command.Message)
 */
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
 messageSend.getMessage().setPersistent(isPersistent());
 next.send(producerExchange, messageSend);
}

代码示例来源:origin: stackoverflow.com

public class GetMessage implements IReceiverService {

  @Override
  public void received(Message message) {
    switch (message.getMessageType()) {
    case TEXT_MESSAGE:
      String text = message.getMessage().toString();

      // Look up Wikipedia with
      // https://en.m.wikipedia.org/wiki/<text>
      // process the response and send it back.
      String wiki = "My processed wiki content.";

      Sender.send(message.getSender().getId(), wiki);

      break;
    default:
      System.out.println("Ignore received message.");
    }
  }
}

代码示例来源:origin: stackoverflow.com

public static String getMessageText(Message message, Locale locale) {
  return message.getMessage(locale);
}

代码示例来源:origin: stackoverflow.com

public void register() {
  FacesMessage fmessage;
  userb.encryptPassword();
  Message message = userEAO.create(userb.getUser());
  fmessage = new FacesMessage(message.getMessage());
  FacesContext.getCurrentInstance().addMessage(null, fmessage);
}

代码示例来源:origin: stackoverflow.com

public void recievedMessage(Message message) {
  Log.d("Dagger", "recievedMessage App: " + message.getMessage());

代码示例来源:origin: stackoverflow.com

@org.atmosphere.config.service.Message(encoders = {JacksonEncoder.class}, decoders = {JacksonDecoder.class})
public Message onMessage(AtmosphereResource r, Message message) throws IOException {

  // TODO: Look up any info associated with the connection using r.uuid().

  logger.info("{} just send {}", message.getAuthor(), message.getMessage());
  return message;
}

代码示例来源:origin: stackoverflow.com

mRef.addChildEventListener(new ChildEventListener() {
 @Override
 public void onChildAdded(DataSnapshot dataSnapshot, String s) {
 for (DataSnapshot postSnapshot : dataSnapshot.getChildren()){
   Message message = postSnapshot.getValue(Message.class);
   messages.add(0, message.getTitle() + '\n' + message.getMessage());
   sendNotification(message);
 }
   adapter.notifyDataSetChanged();
 }

代码示例来源:origin: stackoverflow.com

EventBus bus=EventBus.getDefault();



.....THIS METHOD IS GETTING DATA......
 @Subscribe
  public void onLoginEvent(Message event){
    Toast.makeText(getBaseContext(),event.getMessage(), Toast.LENGTH_SHORT).show();
  }

  @Override
  public void onStart() {
    super.onStart();
    bus.register(this);
  }

  @Override
  public void onStop() {
    bus.unregister(this);
    super.onStop();
  }

代码示例来源:origin: stackoverflow.com

List<Message> messages = db.getAllMessages();
ArrayList<String> YOUR_LIST = new ArrayList<>();

for (Message mg : messages) {
  String log = "Id: " + mg.getID() + ", Message: " + mg.getMessage() + ", Time: " + mg.getDate();
  YOUR_LIST.add(log);
}

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, YOUR_LIST);

ListView listView = (ListView) findViewById(R.id.YOUR_LISTVIEW);
listView.setAdapter(adapter)

代码示例来源:origin: stackoverflow.com

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
  //a direct absolute path just for testning
  chainClassLoader(new File("C:\\Users\\admin\\.m2\\repository\\message-plugin\\real-message\\1.0\\real-message-1.0.jar"));
  Message message = null;

  try {
    Class<?> clazz = Class.forName(messageClass);
    message = (Message) clazz.newInstance();
  } catch (Exception e) {
    getLog().error(e);
  }

  getLog().info(message.getMessage());
}

private void chainClassLoader(File file) throws Exception {
    ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
    URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{file.toURI().toURL()}, currentClassLoader);
    Thread.currentThread().setContextClassLoader(urlClassLoader);
}

代码示例来源:origin: stackoverflow.com

@Override
public void onReceive(Object message) throws Exception {
  // ...

  if (message instanceof Message) {
     Message messageToSend = (Message) message;
     // Loop through the list above and send the message to
     // each connection. For example...
     for (ActorRef wsConnection : senders.get(messageToSend.getSendToId())) {
       // Send "Hi" to each of the other client's
       // connected sessions
       wsConnection.tell(messageToSend.getMessage());
     }
  }

  // ...
}

代码示例来源:origin: stackoverflow.com

public void sendNotification(Message message) {
  NotificationCompat.Builder mBuilder =
    new NotificationCompat.Builder(this) 
      .setSmallIcon(R.drawable.logo_he_digita_homepage)
      .setContentTitle(message.getTitle())
      .setContentText(message.getMessage());
    Intent resultIntent = new Intent(this, updates.class);
    TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);
    stackBuilder.addParentStack(updates.class);
    stackBuilder.addNextIntent(resultIntent);
    PendingIntent resultPendingIntent = 
      stackBuilder.getPendingIntent(
        0,
        PendingIntent.FLAG_UPDATE_CURRENT);
    mBuilder.setContentIntent(resultPendingIntent);
    NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
    mNotificationManager.notify(124453245, mBuilder.build());

}

代码示例来源:origin: org.apache.activemq/activemq-broker

/** Sets the persistence mode
 * @see org.apache.activemq.broker.BrokerFilter#send(org.apache.activemq.broker.ProducerBrokerExchange, org.apache.activemq.command.Message)
 */
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
 messageSend.getMessage().setPersistent(isPersistent());
 next.send(producerExchange, messageSend);
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

/** Sets the persistence mode
 * @see org.apache.activemq.broker.BrokerFilter#send(org.apache.activemq.broker.ProducerBrokerExchange, org.apache.activemq.command.Message)
 */
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
 messageSend.getMessage().setPersistent(isPersistent());
 next.send(producerExchange, messageSend);
}

代码示例来源:origin: org.apache.activemq/activemq-all

/** Sets the persistence mode
 * @see org.apache.activemq.broker.BrokerFilter#send(org.apache.activemq.broker.ProducerBrokerExchange, org.apache.activemq.command.Message)
 */
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
 messageSend.getMessage().setPersistent(isPersistent());
 next.send(producerExchange, messageSend);
}

代码示例来源:origin: pierre/meteo

/** Sets the persistence mode
 * @see org.apache.activemq.broker.BrokerFilter#send(org.apache.activemq.broker.ProducerBrokerExchange, org.apache.activemq.command.Message)
 */
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
 messageSend.getMessage().setPersistent(isPersistent());
 next.send(producerExchange, messageSend);
}

代码示例来源:origin: stackoverflow.com

Object msgObj = msg.getMessage(); 
if (msgObj instanceof javax.jms.Message) { 
  javax.jms.Message jmsMsg = (javax.jms.Message) msgObj;

代码示例来源:origin: stackoverflow.com

holder.message.setText(message.getMessage());
holder.date.setText(message.getDate());

相关文章

微信公众号

最新文章

更多

Message类方法