001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.messaging;
016    
017    import java.util.Set;
018    
019    /**
020     * @author Shuyang Zhou
021     */
022    public class DestinationWrapper implements Destination {
023    
024            public DestinationWrapper(Destination destination) {
025                    this.destination = destination;
026            }
027    
028            @Override
029            public boolean addDestinationEventListener(
030                    DestinationEventListener destinationEventListener) {
031    
032                    return destination.addDestinationEventListener(
033                            destinationEventListener);
034            }
035    
036            @Override
037            public void close() {
038                    destination.close();
039            }
040    
041            @Override
042            public void close(boolean force) {
043                    destination.close(force);
044            }
045    
046            @Override
047            public void copyDestinationEventListeners(Destination destination) {
048                    this.destination.copyDestinationEventListeners(destination);
049            }
050    
051            @Override
052            public void copyMessageListeners(Destination destination) {
053                    this.destination.copyMessageListeners(destination);
054            }
055    
056            @Override
057            public void destroy() {
058                    this.destination.destroy();
059            }
060    
061            @Override
062            public DestinationStatistics getDestinationStatistics() {
063                    return destination.getDestinationStatistics();
064            }
065    
066            @Override
067            public int getMessageListenerCount() {
068                    return destination.getMessageListenerCount();
069            }
070    
071            @Override
072            public Set<MessageListener> getMessageListeners() {
073                    return destination.getMessageListeners();
074            }
075    
076            @Override
077            public String getName() {
078                    return destination.getName();
079            }
080    
081            @Override
082            public boolean isRegistered() {
083                    return destination.isRegistered();
084            }
085    
086            @Override
087            public void open() {
088                    destination.open();
089            }
090    
091            @Override
092            public boolean register(MessageListener messageListener) {
093                    return destination.register(messageListener);
094            }
095    
096            @Override
097            public boolean register(
098                    MessageListener messageListener, ClassLoader classloader) {
099    
100                    return destination.register(messageListener, classloader);
101            }
102    
103            @Override
104            public boolean removeDestinationEventListener(
105                    DestinationEventListener destinationEventListener) {
106    
107                    return destination.removeDestinationEventListener(
108                            destinationEventListener);
109            }
110    
111            @Override
112            public void removeDestinationEventListeners() {
113                    destination.removeDestinationEventListeners();
114            }
115    
116            @Override
117            public void send(Message message) {
118                    destination.send(message);
119            }
120    
121            @Override
122            public boolean unregister(MessageListener messageListener) {
123                    return destination.unregister(messageListener);
124            }
125    
126            @Override
127            public void unregisterMessageListeners() {
128                    destination.unregisterMessageListeners();
129            }
130    
131            protected Destination destination;
132    
133    }