org.apache.bsf.debug.util

Class SocketConnection

public abstract class SocketConnection extends Object

Field Summary
protected DataInputStreamfDataInputStream
protected DataOutputStreamfDataOutputStream
protected InputStreamfInputStream
protected OutputStreamfOutputStream
protected StubTablefStubs
Constructor Summary
protected SocketConnection()
Method Summary
protected abstract voiddispatchInvocation(ResultCell rcell)
voidexportSkeleton(Skeleton skel)
SkeletongetSkeleton(int uid)
StubgetStub(int tid, int uid)
voidlisten()
ResultCellprepareOutgoingInvoke(Stub self, int classId, int methodId)
First call made by a stub.
ResultCellsearchCell(int cmdId)
voidstopListening()
Stubswizzle(int tid, int uid)
protected voidwireExceptionNotify(Exception ex)
A Wire-related exception occurred.

Field Detail

fDataInputStream

protected DataInputStream fDataInputStream

fDataOutputStream

protected DataOutputStream fDataOutputStream

fInputStream

protected InputStream fInputStream

fOutputStream

protected OutputStream fOutputStream

fStubs

protected StubTable fStubs

Constructor Detail

SocketConnection

protected SocketConnection()

Method Detail

dispatchInvocation

protected abstract void dispatchInvocation(ResultCell rcell)

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)
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.