|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.burlap.io.AbstractBurlapInput
Abstract base class for Burlap requests. Burlap users should only need to use the methods in this class.
AbstractBurlapInput in = ...; // get input String value; in.startReply(); // read reply header value = in.readString(); // read string value in.completeReply(); // read reply footer
Field Summary | |
private BurlapRemoteResolver |
resolver
|
Constructor Summary | |
AbstractBurlapInput()
|
Method Summary | |
abstract int |
addRef(java.lang.Object obj)
Adds an object reference. |
abstract void |
completeCall()
Completes reading the call |
abstract void |
completeReply()
Completes reading the call |
abstract void |
expectTag(int tag)
Read the end of a map |
abstract java.io.InputStream |
getInputStream()
Starts reading a byte array using an input stream. |
abstract java.lang.String |
getMethod()
Returns the call's method |
abstract java.io.Reader |
getReader()
Starts reading a string. |
BurlapRemoteResolver |
getRemoteResolver()
Sets the resolver used to lookup remote objects. |
abstract void |
init(java.io.InputStream is)
Initialize the Burlap stream with the underlying input stream. |
abstract boolean |
isEnd()
Returns true if the data has ended. |
abstract boolean |
readBoolean()
Reads a boolean |
abstract byte[] |
readBytes()
Reads a byte array. |
abstract double |
readDouble()
Reads a double. |
abstract int |
readInt()
Reads an integer |
abstract void |
readListEnd()
Read the end of a list |
abstract int |
readListStart()
Reads the start of a list |
abstract long |
readLong()
Reads a long |
abstract void |
readMapEnd()
Read the end of a map |
abstract int |
readMapStart()
Reads the start of a map |
abstract org.w3c.dom.Node |
readNode()
Reads an XML node encoded in UTF-8 |
abstract void |
readNull()
Reads a null |
abstract java.lang.Object |
readObject()
Reads an arbitrary object from the input stream. |
abstract java.lang.Object |
readObject(java.lang.Class expectedClass)
Reads an arbitrary object from the input stream. |
abstract java.lang.Object |
readRef()
Reads a reference |
abstract java.lang.Object |
readRemote()
Reads a remote object reference to the stream. |
abstract java.lang.Object |
readReply(java.lang.Class expectedClass)
Reads a reply as an object. |
abstract java.lang.String |
readString()
Reads a string encoded in UTF-8 |
abstract java.lang.String |
readType()
Reads an object type. |
abstract long |
readUTCDate()
Reads a date. |
void |
setRemoteResolver(BurlapRemoteResolver resolver)
Sets the resolver used to lookup remote objects. |
abstract void |
startCall()
Starts reading the call |
abstract void |
startReply()
Starts reading the reply |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private BurlapRemoteResolver resolver
Constructor Detail |
public AbstractBurlapInput()
Method Detail |
public abstract void init(java.io.InputStream is)
public abstract java.lang.String getMethod()
public void setRemoteResolver(BurlapRemoteResolver resolver)
public BurlapRemoteResolver getRemoteResolver()
public abstract void startCall() throws java.io.IOException
The call expects the following protocol data
c major minor m b16 b8 method
java.io.IOException
public abstract void completeCall() throws java.io.IOException
The call expects the following protocol data
Z
java.io.IOException
public abstract java.lang.Object readReply(java.lang.Class expectedClass) throws java.lang.Throwable
java.lang.Throwable
public abstract void startReply() throws java.lang.Throwable
A successful completion will have a single value:
r v
java.lang.Throwable
public abstract void completeReply() throws java.io.IOException
A successful completion will have a single value:
z
java.io.IOException
public abstract boolean readBoolean() throws java.io.IOException
T F
java.io.IOException
public abstract void readNull() throws java.io.IOException
N
java.io.IOException
public abstract int readInt() throws java.io.IOException
I b32 b24 b16 b8
java.io.IOException
public abstract long readLong() throws java.io.IOException
L b64 b56 b48 b40 b32 b24 b16 b8
java.io.IOException
public abstract double readDouble() throws java.io.IOException
D b64 b56 b48 b40 b32 b24 b16 b8
java.io.IOException
public abstract long readUTCDate() throws java.io.IOException
T b64 b56 b48 b40 b32 b24 b16 b8
java.io.IOException
public abstract java.lang.String readString() throws java.io.IOException
s b16 b8 non-final string chunk S b16 b8 final string chunk
java.io.IOException
public abstract org.w3c.dom.Node readNode() throws java.io.IOException
x b16 b8 non-final xml chunk X b16 b8 final xml chunk
java.io.IOException
public abstract java.io.Reader getReader() throws java.io.IOException
s b16 b8 non-final string chunk S b16 b8 final string chunk
java.io.IOException
public abstract java.io.InputStream getInputStream() throws java.io.IOException
b b16 b8 non-final binary chunk B b16 b8 final binary chunk
java.io.IOException
public abstract byte[] readBytes() throws java.io.IOException
b b16 b8 non-final binary chunk B b16 b8 final binary chunk
java.io.IOException
public abstract java.lang.Object readObject(java.lang.Class expectedClass) throws java.io.IOException
expectedClass
- the expected class if the protocol doesn't supply it.
java.io.IOException
public abstract java.lang.Object readObject() throws java.io.IOException
java.io.IOException
public abstract java.lang.Object readRemote() throws java.io.IOException
'r' 't' b16 b8 type url
java.io.IOException
public abstract java.lang.Object readRef() throws java.io.IOException
R b32 b24 b16 b8
java.io.IOException
public abstract int addRef(java.lang.Object obj) throws java.io.IOException
java.io.IOException
public abstract int readListStart() throws java.io.IOException
java.io.IOException
public abstract int readMapStart() throws java.io.IOException
java.io.IOException
public abstract java.lang.String readType() throws java.io.IOException
java.io.IOException
public abstract void expectTag(int tag) throws java.io.IOException
java.io.IOException
public abstract boolean isEnd() throws java.io.IOException
java.io.IOException
public abstract void readMapEnd() throws java.io.IOException
java.io.IOException
public abstract void readListEnd() throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |