KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ubermq > jms > common > routing > impl > MessageDatagramSourceDescriptor


1 /*
2  * Copyright (c) 2004 Rhombus Technologies, Inc.
3  * All rights reserved.
4  */

5 package com.ubermq.jms.common.routing.impl;
6
7 import com.ubermq.jms.common.datagram.*;
8 import com.ubermq.jms.common.routing.*;
9
10 /**
11  * A source descriptor that also contains a message datagram. This implementation
12  * extends the static descriptor, constructing it with the datagram's topic, so that
13  * it behaves like a normal topic based descriptor.
14  */

15 public class MessageDatagramSourceDescriptor
16     extends StaticSourceDescriptor
17 {
18     private IMessageDatagram messageDatagram;
19
20     /**
21      *
22      */

23     public MessageDatagramSourceDescriptor(IMessageDatagram md)
24     {
25         super(md.getTopicName());
26         this.messageDatagram = md;
27     }
28
29     public String JavaDoc getDisplayName()
30     {
31         return super.getDisplayName() + " message: " + messageDatagram;
32     }
33     
34     public IMessageDatagram getMessageDatagram()
35     {
36         return this.messageDatagram;
37     }
38     
39 }
40
Popular Tags