org.apache.bsf.debug.util
Class SocketConnection

java.lang.Object
  extended byorg.apache.bsf.debug.util.SocketConnection
Direct Known Subclasses:
ClientConnection, ObjectServer

public abstract class SocketConnection
extends java.lang.Object


Field Summary
protected  java.io.DataInputStream fDataInputStream
           
protected  java.io.DataOutputStream fDataOutputStream
           
protected  java.io.InputStream fInputStream
           
protected  java.io.OutputStream fOutputStream
           
protected  StubTable fStubs
           
 
Constructor Summary
protected SocketConnection()
           
 
Method Summary
protected abstract  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(java.lang.Exception ex)
          A Wire-related exception occurred.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fStubs

protected StubTable fStubs

fInputStream

protected java.io.InputStream fInputStream

fOutputStream

protected java.io.OutputStream fOutputStream

fDataInputStream

protected java.io.DataInputStream fDataInputStream

fDataOutputStream

protected java.io.DataOutputStream fDataOutputStream
Constructor Detail

SocketConnection

protected SocketConnection()
Method Detail

exportSkeleton

public void exportSkeleton(Skeleton skel)

getSkeleton

public Skeleton getSkeleton(int uid)

getStub

public Stub getStub(int tid,
                    int uid)

listen

public void listen()

stopListening

public void stopListening()

prepareOutgoingInvoke

public ResultCell prepareOutgoingInvoke(Stub self,
                                        int classId,
                                        int methodId)
                                 throws java.io.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.

Throws:
java.io.IOException

searchCell

public ResultCell searchCell(int cmdId)

swizzle

public Stub swizzle(int tid,
                    int uid)

dispatchInvocation

protected abstract void dispatchInvocation(ResultCell rcell)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

wireExceptionNotify

protected void wireExceptionNotify(java.lang.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.