1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.messaging;
16  
17  /**
18   * <a href="Destination.java.html"><b><i>View Source</i></b></a>
19   *
20   * @author Michael C. Han
21   */
22  public interface Destination {
23  
24      public void addDestinationEventListener(
25          DestinationEventListener destinationEventListener);
26  
27      public void close();
28  
29      public void close(boolean force);
30  
31      public void copyDestinationEventListeners(Destination destination);
32  
33      public void copyMessageListeners(Destination destination);
34  
35      public DestinationStatistics getDestinationStatistics();
36  
37      public int getMessageListenerCount();
38  
39      public String getName();
40  
41      public boolean isRegistered();
42  
43      public void open();
44  
45      public boolean register(MessageListener messageListener);
46  
47      public boolean register(
48          MessageListener messageListener, ClassLoader classloader);
49  
50      public void removeDestinationEventListener(
51          DestinationEventListener destinationEventListener);
52  
53      public void removeDestinationEventListeners();
54  
55      public void send(Message message);
56  
57      public boolean unregister(MessageListener messageListener);
58  
59      public void unregisterMessageListeners();
60  
61  }