User: dmaplesden
  Date: 01/10/02 19:27:40

  Modified:    src/main/org/jboss/mq SpyDestination.java
  Log:
  Change to externalization code to handle externalising temporary destinations
  
  Revision  Changes    Path
  1.3       +13 -1     jbossmq/src/main/org/jboss/mq/SpyDestination.java
  
  Index: SpyDestination.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/SpyDestination.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SpyDestination.java       2001/08/17 03:04:01     1.2
  +++ SpyDestination.java       2001/10/03 02:27:40     1.3
  @@ -18,7 +18,7 @@
    * @author     Hiram Chirino ([EMAIL PROTECTED])
    * @author     David Maplesden ([EMAIL PROTECTED])
    * @created    August 16, 2001
  - * @version    $Revision: 1.2 $
  + * @version    $Revision: 1.3 $
    */
   public class SpyDestination
          implements Destination, Serializable {
  @@ -31,6 +31,8 @@
      protected final static int OBJECT = 1;
      protected final static int SPY_QUEUE = 2;
      protected final static int SPY_TOPIC = 3;
  +   protected final static int SPY_TEMP_QUEUE = 4;
  +   protected final static int SPY_TEMP_TOPIC = 5;
   
      SpyDestination( String name ) {
         this.name = name;
  @@ -54,6 +56,12 @@
         throws java.io.IOException {
         if ( dest == null ) {
            out.writeByte( NULL );
  +      } else if ( dest instanceof SpyTemporaryQueue ) {
  +         out.writeByte( SPY_TEMP_QUEUE );
  +         out.writeUTF( ( ( SpyTemporaryQueue )dest ).getName() );
  +      } else if ( dest instanceof SpyTemporaryTopic ) {
  +         out.writeByte( SPY_TEMP_TOPIC );
  +         out.writeUTF( ( ( SpyTemporaryTopic )dest ).getName() );
         } else if ( dest instanceof SpyQueue ) {
            out.writeByte( SPY_QUEUE );
            out.writeUTF( ( ( SpyQueue )dest ).getName() );
  @@ -79,6 +87,10 @@
         byte destType = in.readByte();
         if ( destType == NULL ) {
            return null;
  +      } else if ( destType == SPY_TEMP_QUEUE ) {
  +         return new SpyTemporaryQueue( in.readUTF(), null );
  +      } else if ( destType == SPY_TEMP_TOPIC ) {
  +         return new SpyTemporaryTopic( in.readUTF(), null );
         } else if ( destType == SPY_QUEUE ) {
            return new SpyQueue( in.readUTF() );
         } else if ( destType == SPY_TOPIC ) {
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to