java.lang.Objectcom.microfocus.cobol.connector.transport.BINPStream
BINP Stream handler helper class
Copyright: Copyright (c) 2002-2003 Company: Micro Focus International Ltd
| Field Summary | |
static int |
BF_HHDR_COMPRESS_SYSTEM_GZIP
|
static byte |
BF_HHDR_DIGEST_MD5
|
static byte |
BF_HHDR_DIGEST_NONE
|
static byte |
BF_HHDR_DIGEST_SHA_1
|
static int |
BF_HHDR_FLAG_COMPRESS
|
static int |
BF_HHDR_FLAG_DIGEST_INCLUDED
|
static int |
BF_HHDR_FLAG_KEEPALIVE_FLAGSINCLUDED
|
static int |
BF_HHDR_FLAG_SERVICE_CLASS_INCLUDED
|
static int |
BF_HHDR_FLAG_SERVICE_HANDLE_INCLUDED
|
static int |
BF_HHDR_FLAG_SERVICE_PRIORITY_INCLUDED
|
static int |
BF_HHDR_FLAG_SESSION_MAN_ACTIVATE
|
static int |
BF_HHDR_FLAG_SESSION_MAN_INCLUDED
|
static int |
BF_HHDR_FLAG_SESSION_MAN_PASSIVATE
|
static int |
BF_HHDR_FLAG_SESSION_MAN_RESERVED
|
static int |
BF_HHDR_FLAG_SESSIONID_INCLUDED
|
static int |
BF_HHDR_FLAG_TRACE_FLAGS_INCLUDED
|
static int |
BF_HHDR_VERSION
|
| Constructor Summary | |
BINPStream(InetAddress hostname,
int port)
Construct a BINPStream instance given a hostname, port, no timeout and no sleep interval |
|
BINPStream(InetAddress hostname,
int port,
long timeout,
long sleepInterval)
Construct a BINPStream instance given a hostname, port, timeout and sleep interval |
|
BINPStream(Socket existingConnection)
Construct a BINPStream instance given a existing socket |
|
BINPStream(String hostname,
int port,
long timeout,
long sleepInterval,
boolean secure,
String keystore,
String keystorePassword)
Construct a BINPStream instance given a hostname, port, timeout and sleep interval a keystore and keystorepassword (used for SSL access) |
|
| Method Summary | |
void |
Activate()
Activate a remote call |
void |
close()
logically close the BINPStream, if keepalive is active and pooling is turned on then we pool the connection and avoid a physical close |
static InetAddress |
getHostAddress(String host)
get a cached InetAddress |
InetAddress |
getInetAddress()
get the inetaddress of the current BINPStream instance |
InputStream |
getInputStream()
get the inputstream for the BINPStream |
byte[] |
getLastMessage()
Method declaration |
static byte[] |
getMD5Digest(byte[] text)
get MD5 digest given a byte[] |
OutputStream |
getOutputStream()
get the outputstream for the BINPStream |
String |
getSessionId()
Method declaration |
static byte[] |
getSHA1Digest(byte[] text)
get MD5 digest given a byte[] |
static long |
getSocketsClosed()
|
static long |
getSocketsCreated()
|
static String |
getSocketStoreDebugInfo()
|
static int |
getSocketStoreSize()
|
boolean |
isKeepConnectionAlive()
return the keep alive connection status |
boolean |
isPoolConnection()
query pool connection status |
boolean |
isSocketFromSocketStore()
Method declaration |
void |
Passivate(boolean prepare)
Passivate a remote call |
DataInputStream |
readMessage(DataInputStream physicalDis)
Method declaration |
void |
registerBINPAuditor(BINPAuditor auditorInstance)
Register a BINPAuditor for the BINPStream |
void |
reOpenClosedConnection()
Method declaration |
void |
setCompress(boolean compress)
Method declaration |
void |
setCompressionWaterMark(long compressionWaterMark)
Method declaration |
void |
setKeepConnectionAlive(boolean keepConnectionAlive)
set the keepalive connection status |
void |
setPoolConnection(boolean poolConnection)
set connection pool status |
static void |
setSocketStoreSize(int newLimit)
|
void |
writeMessageBundle(byte digestType,
DataOutputStream dos,
byte[] message,
String guid)
Method declaration |
byte[] |
writeMessageBundle(byte digestType,
DataOutputStream dos,
DataOutputStream physicalDos,
ByteArrayOutputStream byteOutputStream,
String guid)
Method declaration |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int BF_HHDR_VERSION
public static final int BF_HHDR_FLAG_DIGEST_INCLUDED
public static final int BF_HHDR_FLAG_SERVICE_HANDLE_INCLUDED
public static final int BF_HHDR_FLAG_SERVICE_CLASS_INCLUDED
public static final int BF_HHDR_FLAG_SERVICE_PRIORITY_INCLUDED
public static final int BF_HHDR_FLAG_TRACE_FLAGS_INCLUDED
public static final int BF_HHDR_FLAG_KEEPALIVE_FLAGSINCLUDED
public static final int BF_HHDR_FLAG_SESSIONID_INCLUDED
public static final int BF_HHDR_FLAG_SESSION_MAN_INCLUDED
public static final int BF_HHDR_FLAG_COMPRESS
public static final int BF_HHDR_FLAG_SESSION_MAN_RESERVED
public static final int BF_HHDR_FLAG_SESSION_MAN_PASSIVATE
public static final int BF_HHDR_FLAG_SESSION_MAN_ACTIVATE
public static final byte BF_HHDR_DIGEST_NONE
public static final byte BF_HHDR_DIGEST_MD5
public static final byte BF_HHDR_DIGEST_SHA_1
public static final int BF_HHDR_COMPRESS_SYSTEM_GZIP
| Constructor Detail |
public BINPStream(InetAddress hostname,
int port)
throws BindException,
Exception
hostname - port -
BindException
Exception
public BINPStream(InetAddress hostname,
int port,
long timeout,
long sleepInterval)
throws BindException,
Exception
hostname - port - timeout - sleepInterval -
BindException
Exception
public BINPStream(String hostname,
int port,
long timeout,
long sleepInterval,
boolean secure,
String keystore,
String keystorePassword)
throws BindException,
Exception
hostname - port - timeout - sleepInterval -
BindException
Exceptionpublic BINPStream(Socket existingConnection)
existingConnection - | Method Detail |
public InputStream getInputStream()
throws IOException
IOExceptionpublic InetAddress getInetAddress()
public OutputStream getOutputStream()
throws IOException
IOException
public void close()
throws IOException
IOException
public DataInputStream readMessage(DataInputStream physicalDis)
throws IOException
physicalDis -
IOException
public byte[] writeMessageBundle(byte digestType,
DataOutputStream dos,
DataOutputStream physicalDos,
ByteArrayOutputStream byteOutputStream,
String guid)
throws IOException
digestType - dos - physicalDos - byteOutputStream - guid -
IOException
public void writeMessageBundle(byte digestType,
DataOutputStream dos,
byte[] message,
String guid)
throws IOException
digestType - dos - message - guid -
IOExceptionpublic void registerBINPAuditor(BINPAuditor auditorInstance)
auditorInstance - public static byte[] getMD5Digest(byte[] text)
text -
public static byte[] getSHA1Digest(byte[] text)
text -
public static InetAddress getHostAddress(String host)
throws UnknownHostException
host - String hostname
UnknownHostExceptionpublic boolean isKeepConnectionAlive()
public void setKeepConnectionAlive(boolean keepConnectionAlive)
keepConnectionAlive - a booleanpublic boolean isPoolConnection()
public void setPoolConnection(boolean poolConnection)
poolConnection - a booleanpublic String getSessionId()
public byte[] getLastMessage()
public void Activate()
throws IOException
IOExceptionpublic void Passivate(boolean prepare)
public boolean isSocketFromSocketStore()
public void reOpenClosedConnection()
throws IOException
IOExceptionpublic void setCompress(boolean compress)
compress - public void setCompressionWaterMark(long compressionWaterMark)
compressionWaterMark - public static int getSocketStoreSize()
public static void setSocketStoreSize(int newLimit)
public static String getSocketStoreDebugInfo()
public static long getSocketsCreated()
public static long getSocketsClosed()
Copyright © 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.