com.infoengine.procunit.gateway
Class Netlib

java.lang.Object
  extended bycom.infoengine.procunit.gateway.Netlib

public class Netlib
extends Object


Field Summary
private  String adapter_encoding
           
private  byte[] data
           
private  int dlen
           
private  DataInputStream input
           
private  com.infoengine.log.LogWriter logWriter
           
private static int MSG_DATA
           
private static int MSG_EOD
           
private static int MSG_FAILURE
           
private static byte[] MSG_OBJECT_RESPONSE
           
private static byte[] MSG_STATUS_RESPONSE
           
private static byte[] MSG_STREAM_RESPONSE
           
private static int MSG_SUCCESS
           
private static byte[] NET_MSG_DATA
           
private static byte[] NET_MSG_EOD
           
private static byte[] NET_MSG_FAILURE
           
private static byte[] NET_MSG_STATUS
           
private static byte[] NET_MSG_SUCCESS
           
private static byte[] NET_MSG_VERSION
           
private static int OBJECT_TYPE
           
private  DataOutputStream output
           
private static int STATUS_TYPE
           
private static int STREAM_TYPE
           
private  int type
           
 
Constructor Summary
Netlib(Socket sock)
           
Netlib(Socket sock, String encoding, com.infoengine.log.LogWriter logWriter)
           
 
Method Summary
 void ack()
           
 void close()
           
 void debugMode(boolean verbose)
           
 void eod()
           
 int getAck()
           
private  byte[] getData()
           
 int getMsg()
           
private  String getString()
           
private  int getType()
           
 int intData()
           
private  int length()
           
private  void putData(byte[] arr)
           
private  void putData(byte[] arr, int len)
           
protected  void putMsg(byte[] arr)
           
private  void putMsg(byte[] arr, int len)
           
private  void putMsg(File file)
           
private  void putMsg(int type, String str)
           
private  void putMsg(int type, String str, byte[] data)
           
 void putMsg(String str)
           
 Object recv()
           
 void send(Element node)
           
 void send(Group group)
           
 void send(Webject webject)
           
 void send(Webject webject, Group group)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_DATA

private static final int MSG_DATA
See Also:
Constant Field Values

MSG_EOD

private static final int MSG_EOD
See Also:
Constant Field Values

MSG_SUCCESS

private static final int MSG_SUCCESS
See Also:
Constant Field Values

MSG_FAILURE

private static final int MSG_FAILURE
See Also:
Constant Field Values

NET_MSG_DATA

private static byte[] NET_MSG_DATA

NET_MSG_EOD

private static byte[] NET_MSG_EOD

NET_MSG_SUCCESS

private static byte[] NET_MSG_SUCCESS

NET_MSG_FAILURE

private static byte[] NET_MSG_FAILURE

NET_MSG_STATUS

private static byte[] NET_MSG_STATUS

NET_MSG_VERSION

private static byte[] NET_MSG_VERSION

OBJECT_TYPE

private static final int OBJECT_TYPE
See Also:
Constant Field Values

STATUS_TYPE

private static final int STATUS_TYPE
See Also:
Constant Field Values

STREAM_TYPE

private static final int STREAM_TYPE
See Also:
Constant Field Values

MSG_OBJECT_RESPONSE

private static byte[] MSG_OBJECT_RESPONSE

MSG_STATUS_RESPONSE

private static byte[] MSG_STATUS_RESPONSE

MSG_STREAM_RESPONSE

private static byte[] MSG_STREAM_RESPONSE

input

private DataInputStream input

output

private DataOutputStream output

type

private int type

dlen

private int dlen

data

private byte[] data

logWriter

private com.infoengine.log.LogWriter logWriter

adapter_encoding

private String adapter_encoding
Constructor Detail

Netlib

public Netlib(Socket sock)

Netlib

public Netlib(Socket sock,
              String encoding,
              com.infoengine.log.LogWriter logWriter)
Method Detail

ack

public void ack()
         throws IOException
Throws:
IOException

eod

public void eod()
         throws IOException
Throws:
IOException

recv

public Object recv()
            throws IOException
Throws:
IOException

send

public void send(Element node)
          throws IOException
Throws:
IOException

send

public void send(Group group)
          throws IOException
Throws:
IOException

send

public void send(Webject webject)
          throws IOException
Throws:
IOException

send

public void send(Webject webject,
                 Group group)
          throws IOException
Throws:
IOException

close

public void close()

debugMode

public void debugMode(boolean verbose)

length

private int length()

getType

private int getType()

getData

private byte[] getData()

intData

public int intData()

getString

private String getString()

getAck

public int getAck()
           throws IOException
Throws:
IOException

getMsg

public int getMsg()
           throws IOException
Throws:
IOException

putData

private void putData(byte[] arr)
              throws IOException
Throws:
IOException

putData

private void putData(byte[] arr,
                     int len)
              throws IOException
Throws:
IOException

putMsg

private void putMsg(byte[] arr,
                    int len)
             throws IOException
Throws:
IOException

putMsg

protected void putMsg(byte[] arr)
               throws IOException
Throws:
IOException

putMsg

private void putMsg(int type,
                    String str)
             throws IOException
Throws:
IOException

putMsg

private void putMsg(int type,
                    String str,
                    byte[] data)
             throws IOException
Throws:
IOException

putMsg

public void putMsg(String str)
            throws IOException
Throws:
IOException

putMsg

private void putMsg(File file)
             throws IOException
Throws:
IOException