ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/netserver.htm

105 lines
6.9 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?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="NetServer" />
<meta name="abstract" content="NetServer has been deprecated and replaced by class ISeriesNetServer." />
<meta name="description" content="NetServer has been deprecated and replaced by class ISeriesNetServer." />
<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="netserver" />
<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>NetServer</title>
</head>
<body id="netserver"><a name="netserver"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">NetServer</h1>
<div><p>NetServer™ has
been deprecated and replaced by class ISeriesNetServer.</p>
<div class="section"><p>The NetServer class
represents the NetServer service
on an iSeries™ server.
NetServer objects
allow you to query and modify the state and configuration of the NetServer service.</p>
<p>For
example, you can use the NetServer class to:</p>
<ul><li><a href="javadoc/com/ibm/as400/access/NetServer.html#START()">Start</a> or <a href="javadoc/com/ibm/as400/access/NetServer.html#END()">stop</a> the NetServer</li>
<li>Get a list of all current <a href="javadoc/com/ibm/as400/access/NetServer.html#LISTFILESHARES()">file shares</a> and <a href="javadoc/com/ibm/as400/access/NetServer.html#LISTPRINTSHARES()">print shares</a></li>
<li>Get a list of all <a href="javadoc/com/ibm/as400/access/NetServer.html#LISTSESSIONS()">current sessions</a></li>
<li><a href="javadoc/com/ibm/as400/resource/ChangeableResource.html#GETATTRIBUTEVALUE(JAVA.LANG.OBJECT)">Query</a> and <a href="javadoc/com/ibm/as400/resource/ChangeableResource.html#SETATTRIBUTEVALUE(JAVA.LANG.OBJECT, JAVA.LANG.OBJECT, INT)">change</a> attribute values (using methods inherited from
ChangeableResource)</li>
</ul>
<div class="note"><span class="notetitle">Note:</span> In order to use the NetServer class, you need a server
user profile that has *IOSYSCFG authority.</div>
<p>The NetServer class
is an extension of <a href="javadoc/com/ibm/as400/resource/ChangeableResource.html">ChangeableResource</a> and <a href="javadoc/com/ibm/as400/resource/Resource.html">Resource</a>, so it provides a collection of "attributes"
to represent the various NetServer values and settings. You <a href="javadoc/com/ibm/as400/resource/ChangeableResource.html#GETATTRIBUTEVALUE(JAVA.LANG.OBJECT)">query</a> or <a href="javadoc/com/ibm/as400/resource/ChangeableResource.html#SETATTRIBUTEVALUE(JAVA.LANG.OBJECT, JAVA.LANG.OBJECT)">change</a> the attributes in order to access or change the
configuration of your NetServer. Some of the NetServer attributes are:</p>
<ul><li><a href="javadoc/com/ibm/as400/access/NetServer.html#NAME">NAME</a></li>
<li><a href="javadoc/com/ibm/as400/access/NetServer.html#NAME_PENDING">NAME_PENDING</a></li>
<li><a href="javadoc/com/ibm/as400/access/NetServer.html#DOMAIN">DOMAIN</a></li>
<li><a href="javadoc/com/ibm/as400/access/NetServer.html#ALLOW_SYSTEM_NAME">ALLOW_SYSTEM_NAME</a></li>
<li><a href="javadoc/com/ibm/as400/access/NetServer.html#AUTOSTART">AUTOSTART</a></li>
<li><a href="javadoc/com/ibm/as400/access/NetServer.html#CCSID">CCSID</a></li>
<li><a href="javadoc/com/ibm/as400/access/NetServer.html#WINS_PRIMARY_ADDRESS">WINS_PRIMARY_ADDRESS</a></li>
</ul>
</div>
<div class="section"><h4 class="sectiontitle">Pending attributes</h4><p>Many of the NetServer attributes
are pending (for example, <a href="javadoc/com/ibm/as400/access/NetServer.html#NAME_PENDING"> NAME_PENDING</a>). Pending attributes represent NetServer values
that take effect the next time you start (or restart) the NetServer on
the server.</p>
<p>When you have a pair of related attributes and one attribute
is pending while the other is nonpending:</p>
<ul><li>The pending attribute is read/write, so you can change it</li>
<li>The nonpending attribute is read-only, so you can query it but you cannot
change it</li>
</ul>
</div>
<div class="section"><h4 class="sectiontitle">Other NetServer classes</h4><p>Related NetServer classes
allow you to get and set detailed information about specific connections,
sessions, file shares, and print shares:</p>
<ul><li><a href="javadoc/com/ibm/as400/access/NetServerConnection.html#NAVBAR_TOP">NetServerConnection</a>: Represents a NetServer connection</li>
<li><a href="javadoc/com/ibm/as400/access/NetServerFileShare.html#NAVBAR_TOP">NetServerFileShare</a>: Represents a NetServer file server share</li>
<li><a href="javadoc/com/ibm/as400/access/NetServerPrintShare.html#NAVBAR_TOP">NetServerPrintShare</a>: Represents a NetServer print server share</li>
<li><a href="javadoc/com/ibm/as400/access/NetServerSession.html#NAVBAR_TOP">NetServerSession</a>: Represents a NetServer session</li>
<li><a href="javadoc/com/ibm/as400/access/NetServerShare.html#NAVBAR_TOP">NetServerShare</a>: Represents a NetServer share</li>
</ul>
</div>
<div class="section" id="netserver__netsrvex"><a name="netserver__netsrvex"><!-- --></a><h4 class="sectiontitle">Example: Using a NetServer object to change the name
of the NetServer</h4><div class="p"><div class="note"><span class="notetitle">Note:</span> Read
the <a href="codedisclaimer.htm#codedisclaimer">Code example disclaimer</a> for
important legal information.</div>
<pre> // Create a system object to represent the iSeries server.
AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWD");
// Create an object with which to query and modify the NetServer.
NetServer nServer = new NetServer(system);
// Set the "pending name" to NEWNAME.
nServer.setAttributeValue(NetServer.NAME_PENDING, "NEWNAME");
// Commit the changes. This sends the changes to the server.
nServer.commitAttributeChanges();
// The NetServer name will get set to NEWNAME the next time the NetServer
// is ended and started.
</pre>
</div>
</div>
</div>
</body>
</html>