org.apache.bsf.debug.util

Class SocketConnection

Known Direct Subclasses:
ClientConnection, ObjectServer

public abstract class SocketConnection
extends java.lang.Object

Field Summary

protected DataInputStream
fDataInputStream
protected DataOutputStream
fDataOutputStream
protected InputStream
fInputStream
protected OutputStream
fOutputStream
protected StubTable
fStubs

Constructor Summary

SocketConnection()

Method Summary

protected void
dispatchInvocation(ResultCell rcell)
void
exportSkeleton(Skeleton skel)
Skeleton
getSkeleton(int uid)
Stub
getStub(int tid, int uid)
void
listen()
ResultCell
prepareOutgoingInvoke(Stub self, int classId, int methodId)
First call made by a stub.
ResultCell
searchCell(int cmdId)
void
stopListening()
Stub
swizzle(int tid, int uid)
protected void
wireExceptionNotify(Exception ex)
A Wire-related exception occurred.

Field Details

fDataInputStream

protected DataInputStream fDataInputStream


fDataOutputStream

protected DataOutputStream fDataOutputStream


fInputStream

protected InputStream fInputStream


fOutputStream

protected OutputStream fOutputStream


fStubs

protected StubTable fStubs

Constructor Details

SocketConnection

protected SocketConnection()

Method Details

dispatchInvocation

protected void dispatchInvocation(ResultCell rcell)
            throws Exception


exportSkeleton

public void exportSkeleton(Skeleton skel)


getSkeleton

public Skeleton getSkeleton(int uid)


getStub

public Stub getStub(int tid,
                    int uid)


listen

public void listen()


prepareOutgoingInvoke

public ResultCell prepareOutgoingInvoke(Stub self,
                                        int classId,
                                        int methodId)
            throws IOException
First call made by a stub. It will allocate the ResultCell and the output buffer for the outgoing packet. It will also check if this out-going remote invocation is part of a global execution already or not. If not, a global execution (distributed thread) is set, other the current one is reused.


searchCell

public ResultCell searchCell(int cmdId)


stopListening

public void stopListening()


swizzle

public Stub swizzle(int tid,
                    int uid)


wireExceptionNotify

protected void wireExceptionNotify(Exception ex)
A Wire-related exception occurred. We will consider that we have lost the connection. All stubs will be revoked... allowing higher-level listener to pick up that some remote objects have been revoked through the StubListener mechanism. Log at lower priority than a standard exception, since this is the client quit mechanism too.