uka.psp
Class PSPServer.Connection

java.lang.Object
  extended byuka.psp.PSPServer.Connection
Enclosing class:
PSPServer

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


Nested Class Summary
 class PSPServer.Connection.Input
          InputStream view of a Connection.
 class PSPServer.Connection.Output
          OutputStream view of a Connection.
 
Field Summary
private  PSPServer.Connection.Input in
           
private  PSPServer.Connection.Output out
           
private  PSP.Port port
           
private  int toNode
           
private  int toPort
           
 
Constructor Summary
(package private) PSPServer.Connection(int toNode, int toPort, PSP.Port port)
           
 
Method Summary
 void close()
           
 PSPServer.Connection.Input getInputStream()
           
 int getNodePortNr()
           
 PSPServer.Connection.Output getOutputStream()
          Note: The streams returned by getInputStream() and getOutputStream() do not conform exactly to the specification of Java streams.
 int getPeerNodeID()
           
 int getPeerPortNr()
           
 PSP.Port internalGetPort()
           
 int receive(boolean[] buffer, int offset, int length)
           
 int receive(byte[] buffer, int offset, int length)
           
 int receive(char[] buffer, int offset, int length)
           
 int receive(double[] buffer, int offset, int length)
           
 int receive(float[] buffer, int offset, int length)
           
 int receive(int[] buffer, int offset, int length)
           
 int receive(long[] buffer, int offset, int length)
           
 int receive(short[] buffer, int offset, int length)
           
 void send(boolean[] buffer, int offset, int length)
           
 void send(byte[] buffer, int offset, int length)
           
 void send(char[] buffer, int offset, int length)
           
 void send(double[] buffer, int offset, int length)
           
 void send(float[] buffer, int offset, int length)
           
 void send(int[] buffer, int offset, int length)
           
 void send(long[] buffer, int offset, int length)
           
 void send(short[] 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

port

private final PSP.Port port

toNode

private final int toNode

toPort

private final int toPort

in

private PSPServer.Connection.Input in

out

private PSPServer.Connection.Output out
Constructor Detail

PSPServer.Connection

PSPServer.Connection(int toNode,
                     int toPort,
                     PSP.Port port)
See Also:
PSPServer.connect(int, int)
Method Detail

getNodePortNr

public int getNodePortNr()

getPeerNodeID

public int getPeerNodeID()

getPeerPortNr

public int getPeerPortNr()

internalGetPort

public PSP.Port internalGetPort()

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

send

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

receive

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

send

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

receive

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

send

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

receive

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

send

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

receive

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

send

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

receive

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

send

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

receive

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

send

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

receive

public final int receive(double[] 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 PSPServer.Connection.Output 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 PSP message passing library therefore some restrictions apply to the streams:


getInputStream

public PSPServer.Connection.Input getInputStream()
See Also:
getOutputStream()