155 lines
8.2 KiB
HTML
155 lines
8.2 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Example: System Properties Class Source File" />
|
|
<meta name="abstract" content="" />
|
|
<meta name="description" content="" />
|
|
<meta name="DC.Relation" scheme="URI" content="systemproperties.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="systempropertiessample2" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Example: System Properties Class Source File</title>
|
|
</head>
|
|
<body id="systempropertiessample2"><a name="systempropertiessample2"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Example: System Properties Class Source File</h1>
|
|
<div><p></p>
|
|
<div class="section"><div class="p"><pre>//=========================================================
|
|
// IBM Toolbox for Java
|
|
//---------------------------------------------------------
|
|
// Sample properties class source file
|
|
//
|
|
// Compile this source file and store the class file in
|
|
// the classpath.
|
|
//=========================================================
|
|
package com.ibm.as400.access;
|
|
|
|
public class Properties
|
|
extends java.util.Properties
|
|
{
|
|
public Properties ()
|
|
{
|
|
/*---------------------------------------------------------*/
|
|
/* Proxy server system properties */
|
|
/*---------------------------------------------------------*/
|
|
|
|
// This system property specifies the proxy server host name
|
|
// and port number, specified in the format: hostName:portNumber
|
|
// The port number is optional.
|
|
put ("com.ibm.as400.access.AS400.proxyServer", "hqoffice");
|
|
|
|
// This system property specifies which portion of the proxy
|
|
// data flow is encrypted via SSL. Valid values are:
|
|
// 1 - Proxy client to proxy server
|
|
// 2 - Proxy server to iSeries server
|
|
// 3 - Proxy client to proxy, and proxy server to iSeries server
|
|
put("com.ibm.as400.access.SecureAS400.proxyEncryptionMode", "1");
|
|
|
|
// This system property specifies how often, in seconds,
|
|
// the proxy server will look for idle connections. The
|
|
// proxy server starts a thread to look for clients that are
|
|
// no longer communicating. Use this property to set how
|
|
// often the thread looks for idle connections.
|
|
put("com.ibm.as400.access.TunnelProxyServer.clientCleanupInterval", "7200");
|
|
|
|
// This system property specifies how long, in seconds, a
|
|
// client can be idle before it is cleaned up. The proxy server
|
|
// starts a thread to look for clients that are no longer
|
|
// communicating. Use this property to set long a client can
|
|
// be idle before it is cleaned up.
|
|
put("com.ibm.as400.access.TunnelProxyServer.clientLifetime", "2700");
|
|
|
|
/*---------------------------------------------------------*/
|
|
/* Trace system properties */
|
|
/*---------------------------------------------------------*/
|
|
|
|
// This system property specifies which trace categories to enable.
|
|
// This is a comma-delimited list containing any combination of trace
|
|
// categories. The complete list of trace categories is defined in
|
|
// the Trace class.
|
|
put ("com.ibm.as400.access.Trace.category", "error,warning,information");
|
|
|
|
// This system property specifies the file to which trace output
|
|
// is written. The default is to write trace output to System.out.
|
|
put ("com.ibm.as400.access.Trace.file", "c:\temp\trace.out");
|
|
|
|
|
|
/*---------------------------------------------------------*/
|
|
/* Command Call system properties */
|
|
/*---------------------------------------------------------*/
|
|
|
|
// This system property specifies whether CommandCalls should
|
|
// be assumed to be thread-safe. If true, all CommandCalls are
|
|
// assumed to be thread-safe. If false, all CommandCalls are
|
|
// assumed to be non-thread-safe. This property is ignored
|
|
// for a given CommandCall object if either
|
|
// CommandCall.setThreadSafe(true/false) or
|
|
// AS400.setMustUseSockets(true) has been performed on the object.
|
|
put ("com.ibm.as400.access.CommandCall.threadSafe", "true");
|
|
|
|
|
|
/*---------------------------------------------------------*/
|
|
/* Program Call system properties */
|
|
/*---------------------------------------------------------*/
|
|
|
|
// This system property specifies whether ProgramCalls should
|
|
// be assumed to be thread-safe. If true, all ProgramCalls are
|
|
// assumed to be thread-safe. If false, all ProgramCalls are
|
|
// assumed to be non-thread-safe. This property is ignored
|
|
// for a given ProgramCall object if either
|
|
// ProgramCall.setThreadSafe(true/false) or
|
|
// AS400.setMustUseSockets(true) has been performed on the object.
|
|
put ("com.ibm.as400.access.ProgramCall.threadSafe", "true");
|
|
|
|
|
|
/*---------------------------------------------------------*/
|
|
/* FTP system properties */
|
|
/*---------------------------------------------------------*/
|
|
|
|
// This system property specifies whether the socket is reused
|
|
// for multiple file transfers (through a single FTP instance),
|
|
// when in "active" mode. If true, the socket is reused.
|
|
// If false, a new socket is created for each file transfer.
|
|
// This property is ignored for a given FTP object if
|
|
// FTP.setReuseSocket(true/false) has been performed on the object.
|
|
put ("com.ibm.as400.access.FTP.reuseSocket", "true");
|
|
|
|
|
|
/*---------------------------------------------------------*/
|
|
/* Connection system properties */
|
|
/*---------------------------------------------------------*/
|
|
|
|
// This system property specifies the default signon handler.
|
|
// This property is ignored for a given AS400 object if
|
|
// AS400.setSignonHandler() has been performed on
|
|
// the object, or if AS400.setDefaultSignonHandler()
|
|
// has been called.
|
|
put ("com.ibm.as400.access.AS400.signonHandler", "mypackage.MyHandler");
|
|
|
|
}
|
|
}</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="systemproperties.htm" title="You can specify system properties to configure various aspects of the IBM Toolbox for Java.">System properties</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |