1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.kernel.messaging;
16  
17  import java.util.Set;
18  
19  /**
20   * <a href="Destination.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Michael C. Han
23   */
24  public interface Destination {
25  
26      public void addDestinationEventListener(
27          DestinationEventListener destinationEventListener);
28  
29      public void close();
30  
31      public void close(boolean force);
32  
33      public void copyDestinationEventListeners(Destination destination);
34  
35      public void copyMessageListeners(Destination destination);
36  
37      public DestinationStatistics getDestinationStatistics();
38  
39      public int getMessageListenerCount();
40  
41      public Set<MessageListener> getMessageListeners();
42  
43      public String getName();
44  
45      public boolean isRegistered();
46  
47      public void open();
48  
49      public boolean register(MessageListener messageListener);
50  
51      public boolean register(
52          MessageListener messageListener, ClassLoader classloader);
53  
54      public void removeDestinationEventListener(
55          DestinationEventListener destinationEventListener);
56  
57      public void removeDestinationEventListeners();
58  
59      public void send(Message message);
60  
61      public boolean unregister(MessageListener messageListener);
62  
63      public void unregisterMessageListeners();
64  
65  }