uka.gm
Class GMServer.Connection

java.lang.Object
  extended byuka.gm.GMServer.Connection
Enclosing class:
GMServer

public static final class GMServer.Connection
extends java.lang.Object


Nested Class Summary
private  class GMServer.Connection.Input
          InputStream view of a Connection.
private  class GMServer.Connection.Output
          OutputStream view of a Connection.
 
Field Summary
private  GMServer.Connection.Input in
           
private  GMServer.Connection.Output out
           
private  int toNode
           
private  int toVPort
           
private  GM.VPort vport
           
 
Constructor Summary
(package private) GMServer.Connection(int toNode, int toVPort, GM.VPort vport)
           
 
Method Summary
 void close()
           
 java.io.InputStream getInputStream()
           
 int getNodeVPortNr()
           
 java.io.OutputStream getOutputStream()
          Note: The streams returned by getInputStream() and getOutputStream() do not conform exactly to the specification of Java streams.
 GM.UID getPeerUID()
           
 int getPeerVPortNr()
           
 GM.UID getUID()
           
 GM.VPort internalGetVPort()
           
 int receive(byte[] buffer, int offset, int length)
           
 void send(byte[] buffer, int offset, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vport

private final GM.VPort vport

toNode

private final int toNode

toVPort

private final int toVPort

in

private GMServer.Connection.Input in

out

private GMServer.Connection.Output out
Constructor Detail

GMServer.Connection

GMServer.Connection(int toNode,
                    int toVPort,
                    GM.VPort vport)
See Also:
GMServer#connect(int, int)
Method Detail

getUID

public GM.UID getUID()

getNodeVPortNr

public int getNodeVPortNr()

getPeerUID

public GM.UID getPeerUID()

getPeerVPortNr

public int getPeerVPortNr()

internalGetVPort

public GM.VPort internalGetVPort()

send

public final void send(byte[] buffer,
                       int offset,
                       int length)
                throws java.io.IOException
Throws:
java.io.IOException

receive

public final int receive(byte[] buffer,
                         int offset,
                         int length)
                  throws java.io.IOException
Throws:
java.io.IOException

close

public final void close()
                 throws java.io.IOException
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
Note: The streams returned by getInputStream() and getOutputStream() do not conform exactly to the specification of Java streams. The stream layer is implemented only as method name conversion layer over the GM message passing library therefore some restrictions apply to the streams:


getInputStream

public java.io.InputStream getInputStream()
See Also:
getOutputStream()