uk.ac.starlink.ast
Interface NeedsChannelizing

All Known Implementing Classes:
IntraMap

public interface NeedsChannelizing

Declares that an AstObject requires object-specific preparation before writing to and/or after reading from a Channel. Any object implementing this interface will have the channelize method called on it before it is written to a sink by a Channel, and the unChannelize method called on it after it is read from a source by a Channel. No other uk.ac.starlink.ast methods will be called on it between calls to channelize and unChannelize, so channelize may leave the object in an unusable state, as long as unChannelize undoes this situation.

Version:
$Id$
Author:
Mark Taylor (Starlink)

Method Summary
 void channelize()
          Does object-specific preparation for output to a Channel.
 void unChannelize()
          Reverses the effects of channelize.
 

Method Detail

channelize

void channelize()
                throws Exception
Does object-specific preparation for output to a Channel. This method is called by the writing methods of a Channel prior to doing the actual write.

The actions of this method should be reversed by the unChannelize method. If that method creates a new AST object (i.e. the pointer field gets set to a new value) then this method should call annul just before returning.

Throws:
Exception - the implementation may cause any exception to be thrown. This will scupper the write.

unChannelize

void unChannelize()
                  throws Exception
Reverses the effects of channelize. This method is called by the reading methods of a Channel after doing the actual read. It may also be called by the writing methods of a Channel after doing the actual write to undo possible destructive effects of the channelize call (it is implementation-specific whether this will actually happen).

Throws:
Exception - the implementation may cause any exception to be thrown. This will scupper the read.


Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.