KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > encoding > BufferManagerRead


1 /*
2  * @(#)BufferManagerRead.java 1.15 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.encoding;
9
10 import java.nio.ByteBuffer JavaDoc;
11 import com.sun.corba.se.impl.encoding.ByteBufferWithInfo;
12 import com.sun.corba.se.impl.protocol.giopmsgheaders.FragmentMessage;
13 import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
14
15 public interface BufferManagerRead
16 {
17     /**
18      * Case: Called from ReaderThread on complete message or fragments.
19      * The given buf may be entire message or a fragment.
20      *
21      * The ReaderThread finds the ReadBufferManager instance either in
22      * in a fragment map (when collecting - GIOP 1.2 phase 1) or
23      * in an active server requests map (when streaming - GIOP 1.2 phase 2).
24      *
25      * As a model for implementation see IIOPInputStream's
26      * constructor of the same name. There are going to be some variations.
27      *
28      */

29
30     public void processFragment ( ByteBuffer JavaDoc byteBuffer,
31     FragmentMessage header);
32
33
34     /**
35      * Case: called from CDRInputStream constructor before unmarshaling.
36      *
37      * Does:
38      *
39      * this.bufQ.get()
40      *
41      * If streaming then sync on bufQ and wait if empty.
42      */

43
44
45     /**
46      * Case: called from CDRInputStream.grow.
47      *
48      * Does:
49      *
50      * this.bufQ.get()
51      *
52      * If streaming then sync on bufQ and wait if empty.
53      */

54
55     public ByteBufferWithInfo underflow (ByteBufferWithInfo bbwi);
56
57     /**
58      * Called once after creating this buffer manager and before
59      * it begins processing.
60      */

61     public void init(Message header);
62
63     /**
64      * Returns the mark/reset handler for this stream.
65      */

66     public MarkAndResetHandler getMarkAndResetHandler();
67
68     /*
69      * Signals that the processing be cancelled.
70      */

71     public void cancelProcessing(int requestId);
72
73     /*
74      * Close BufferManagerRead and perform any oustanding cleanup.
75      */

76     public void close(ByteBufferWithInfo bbwi);
77 }
78
Popular Tags