Class ISeriesNetServer
- java.lang.Object
-
- com.ibm.as400.access.ISeriesNetServer
-
- All Implemented Interfaces:
- java.io.Serializable
public class ISeriesNetServer extends java.lang.Object implements java.io.Serializable
Represents the NetServer service on a system. This class allows the user to query and modify the state and configuration of the NetServer.If the NetServer job on the IBM i system is not started, the "list" methods may return incomplete results. To determine if the NetServer job is started, use the
isStarted
method. To start the NetServer, use thestart
method.Note: The first call to one of the attribute "getter" methods will cause an implicit call to
refresh
, if refresh() hasn't yet been explicitly called. If any exceptions are thrown by refresh() during the implicit call, they will be logged toTrace.ERROR
and ignored. However, should an exception occur during an explicit call to refresh(), it will be thrown to the caller.Note: Typically, methods which change the state or attributes of the NetServer require that the system user profile have *IOSYSCFG special authority. For example, starting or ending the NetServer requires *IOSYSCFG authority.
Note: This class uses some API fields that are available only when connecting to systems at release V5R1 or higher.
import com.ibm.as400.access.*; // Create a NetServer object for a specific system. AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD"); ISeriesNetServer ns = new ISeriesNetServer(system); try { // Get the name of the NetServer. System.out.println("Name: " + ns.getName()); // Get the CCSID of the NetServer. System.out.println("CCSID: " + ns.getCCSID()); // Get the "allow system name" value of the NetServer. System.out.println("'Allow system name': " + ns.isAllowSystemName()); // Set the description of the NetServer. // Note: Changes will take effect after next start of NetServer. ns.setDescription("The NetServer"); ns.commitChanges(); // Set the CCSID of the NetServer to 13488. ns.setCCSID(13488); // Set the "allow system name" value of the NetServer to true. ns.setAllowSystemName(true); // Commit the attribute changes (send them to the system). ns.commitChanges(); } catch (AS400Exception e) { AS400Message[] messageList = e.getAS400MessageList(); for (int i=0; i<messageList.length; i++) { System.out.println(messageList[i].getText()); } } catch (Exception e) { e.printStackTrace(); } finally { if (system != null) system.disconnectAllServices(); }
-
-
Field Summary
Fields Modifier and Type Field and Description static int
ENCRYPTED_PASSWORDS
Value of the NetServer "authentication method" attribute, indicating that the system authenticates with encrypted passwords only.static int
KERBEROS_OR_PASSWORDS
Deprecated.Renamed to NETWORK_AUTHENTICATION_OR_PASSWORDSstatic int
KERBEROS_V5_TOKENS
Deprecated.Renamed to NETWORK_AUTHENTICATIONstatic int
MSG_AUTH_NEGOTIATED
Value of the "message authentication" attribute, indicating that the system supports message authentication, and message authentication is negotiated between the client and the system.static int
MSG_AUTH_NOT_SUPPORTED
Value of the "message authentication" attribute, indicating that the system does not support message authentication.static int
MSG_AUTH_REQUIRED
Value of the "message authentication" attribute, indicating that the system requires message authentication for all connections.static int
NETWORK_AUTHENTICATION
Value of the NetServer "authentication method" attribute, indicating that the system authenticates with Network authentication only.static int
NETWORK_AUTHENTICATION_OR_PASSWORDS
Value of the NetServer "authentication method" attribute, indicating that the system authenticates with Network authentication when possible, but it allows clients to use encrypted passwords when needed.static int
NO_ADMIN_ALERTS
Value of the "minimum message severity" attribute, indicating that administrative alert messages are not sent.static int
NO_AUTO_DISCONNECT
Value of the "idle timeout" attribute, indicating "no autodisconnect".static int
OPP_LOCK_DISABLED
Value of the "opportunistic lock timeout" attribute, indicating that opportunistic locking is disabled.static int
PASSWORD_STRONGER
Value of the "LAN Manager authentication" attribute, indicating that the LANMAN password hash is ignored if a stronger password hash is provided by the client.static int
PASSWORD_STRONGER_OR_MISMATCH
Value of the "LAN Manager authentication" attribute, indicating that the LANMAN password hash is used only if a stronger password hash provided by the client does not match, or if a stronger password hash is not provided.
-
Constructor Summary
Constructors Constructor and Description ISeriesNetServer(AS400 system)
Constructs a NetServer object.
-
Method Summary
Methods Modifier and Type Method and Description void
commitChanges()
Commits all attribute value changes to the system.void
commitChanges(ISeriesNetServerFileShare share)
Commits attribute value changes to the system, for the specified share.void
commitChanges(ISeriesNetServerPrintShare share)
Commits attribute value changes to the system, for the specified share.void
createFileShare(java.lang.String shareName, java.lang.String path)
Creates a file share.void
createFileShare(java.lang.String shareName, java.lang.String path, java.lang.String desc)
Creates a file share.void
createFileShare(java.lang.String shareName, java.lang.String path, java.lang.String desc, int permission)
Creates a file share.void
createFileShare(java.lang.String shareName, java.lang.String path, java.lang.String desc, int permission, int maxUsers)
Creates a file share.void
createPrintShare(java.lang.String shareName, java.lang.String outqLib, java.lang.String outqName)
Creates a print share.void
createPrintShare(java.lang.String shareName, java.lang.String outqLib, java.lang.String outqName, java.lang.String desc, int splfType)
Creates a print share.void
createPrintShare(java.lang.String shareName, java.lang.String outqLib, java.lang.String outqName, java.lang.String desc, int splfType, java.lang.String prtDriver, java.lang.String prtFileLib, java.lang.String prtFileName)
Creates a print share.void
createPrintShare(java.lang.String shareName, java.lang.String outqLib, java.lang.String outqName, java.lang.String desc, int splfType, java.lang.String prtDriver, java.lang.String prtFileLib, java.lang.String prtFileName, boolean publish)
Creates a print share.void
end()
Ends the NetServer job on the IBM i system.void
endSession(long sessionID)
Ends a specific NetServer session.void
endSessionsForWorkstation(java.lang.String workstationName)
Ends all the sessions that were established from the specified workstation.int
getAuthenticationMethod()
Returns the value of the "authentication method" attribute.int
getAuthenticationMethodPending()
Returns the pending value of the "authentication method" attribute.int
getBrowsingInterval()
Returns the value of the "browsing interval" attribute.int
getBrowsingIntervalPending()
Returns the pending value of the "browsing interval" attribute.int
getCCSID()
Returns the value of the "system CCSID" attribute.int
getCCSIDPending()
Returns the pending value of the "system CCSID" attribute.java.lang.String
getDescription()
Returns the value of the "description" attribute.java.lang.String
getDescriptionPending()
Returns the pending value of the "description" attribute.java.lang.String
getDomainName()
Returns the value of the "domain name" attribute.java.lang.String
getDomainNamePending()
Returns the pending value of the "domain name" attribute.int
getEncryptedConnectionEnforcement()
Returns the value of the "encrypted connection enforce" attribute.int
getEncryptedConnectionEnforcementPending()
Returns the pending value of the "Encrypted connection enforcement" attribute.java.lang.String
getGuestUserProfile()
Returns the value of the "guest user profile" attribute.java.lang.String
getGuestUserProfilePending()
Returns the pending value of the "guest user profile" attribute.int
getIdleTimeout()
Returns the value of the "idle timeout" attribute.int
getIdleTimeoutPending()
Returns the pending value of the "idle timeout" attribute.int
getLANManagerAuthentication()
Returns the value of the "LAN Manager authentication" attribute.int
getLANManagerAuthenticationPending()
Returns the pending value of the "LAN Manager authentication" attribute.int
getMessageAuthentication()
Returns the value of the "message authentication" attribute.int
getMessageAuthenticationPending()
Returns the pending value of the "message authentication" attribute.int
getMinimumMessageSeverity()
Returns the value of the "minimum message severity" attribute.int
getMinimumMessageSeverityPending()
Returns the pending value of the "minimum message severity" attribute.java.lang.String
getName()
Returns the value of the "NetServer name" attribute.java.lang.String
getNamePending()
Returns the pending value of the "NetServer name" attribute.int
getOpportunisticLockTimeout()
Returns the value of the "opportunistic lock timeout" attribute.int
getOpportunisticLockTimeoutPending()
Returns the pending value of the "opportunistic lock timeout" attribute.java.lang.String
getServerAuthorizationList()
Returns the value of the "Server Authorization List" attribute.java.lang.String
getServerAuthorizationListPending()
Returns the pending value of the "Server Authorization List" attribute.AS400
getSystem()
Returns the system.java.lang.String
getWINSPrimaryAddress()
Returns the value of the "WINS primary address" attribute.java.lang.String
getWINSPrimaryAddressPending()
Returns the pending value of the "WINS primary address" attribute.java.lang.String
getWINSScopeID()
Returns the value of the "WINS scope ID" attribute.java.lang.String
getWINSScopeIDPending()
Returns the pending value of the "WINS scope ID" attribute.java.lang.String
getWINSSecondaryAddress()
Returns the value of the "WINS secondary address" attribute.java.lang.String
getWINSSecondaryAddressPending()
Returns the pending value of the "WINS secondary address" attribute.boolean
isAllowSystemName()
Returns the value of the "allow system name" attribute.boolean
isAllowSystemNamePending()
Returns the pending value of the "allow system name" attribute.boolean
isAutoStart()
Returns the value of the "autostart" attribute.boolean
isAutoStartPending()
Returns the pending value of the "autostart" attribute.boolean
isLogonServer()
Returns the value of the "logon support" attribute.boolean
isLogonServerPending()
Returns the pending value of the "logon support" attribute.boolean
isStarted()
Indicates whether or not the NetServer job on the system is started.boolean
isWINSServer()
Returns the value of the "WINS enablement" attribute.boolean
isWINSServerPending()
Returns the pending value of the "WINS enablement" attribute.ISeriesNetServerConnection[]
listConnectionsForSession(long sessionID)
Lists all connections for the specified NetServer session.ISeriesNetServerConnection[]
listConnectionsForSession(java.lang.String workstationName)
Lists all connections for the specified NetServer workstation.ISeriesNetServerConnection[]
listConnectionsForShare(java.lang.String shareName)
Returns the connections associated with a specific share.ISeriesNetServerFileShare[]
listFileShares()
Lists all file shares.ISeriesNetServerFileShare[]
listFileShares(java.lang.String shareName)
Lists the file shares.ISeriesNetServerPrintShare[]
listPrintShares()
Lists all print shares.ISeriesNetServerPrintShare[]
listPrintShares(java.lang.String shareName)
Lists the print shares.ISeriesNetServerSession[]
listSessions()
Lists all NetServer sessions.ISeriesNetServerSession[]
listSessionsForWorkstation(java.lang.String name)
Lists all NetServer sessions for the specified workstation.ISeriesNetServerShare[]
listShares()
Lists the shares (both file shares and print shares).void
refresh()
Refreshes the attribute values of this ISeriesNetServer object, from the current in-effect values on the system.void
refresh(ISeriesNetServerConnection connection)
Refreshes the attribute values of the connection object, from the current values on the system.void
refresh(ISeriesNetServerSession session)
Refreshes the attribute values of the session object, from the current values on the system.void
refresh(ISeriesNetServerShare share)
Refreshes the attribute values of the share object, from the currently in-effect values on the system.void
removeShare(java.lang.String shareName)
Removes the specified share.void
setAllowSystemName(boolean value)
Sets the value of the "allow system name" attribute.void
setAuthenticationMethod(int value)
Sets the value of the "authentication method" attribute.void
setAutoStart(boolean value)
Sets the value of the "autostart" attribute.void
setBrowsingInterval(int value)
Sets the value of the "browsing interval" attribute.void
setCCSID(int value)
Sets the value of the "system CCSID" attribute.void
setDescription(java.lang.String value)
Sets the value of the "description" attribute.void
setDomainName(java.lang.String value)
Sets the value of the "domain name" attribute.void
setEncryptedConnectionEnforcement(int value)
Sets the value of the "Encrypted connection enforcement" attribute.void
setGuestUserProfile(java.lang.String value)
Sets the value of the "guest user profile" attribute.void
setIdleTimeout(int value)
Sets the value of the "idle timeout" attribute.void
setLANManagerAuthentication(int value)
Sets the value of the "LAN Manager authentication" attribute.void
setLogonServer(boolean value)
Sets the value of the "logon support" attribute.void
setMessageAuthentication(int value)
Sets the value of the "message authentication" attribute.void
setMinimumMessageSeverity(int value)
Sets the value of the "minimum message severity" attribute.void
setName(java.lang.String value)
Sets the value of the "NetServer name" attribute.void
setOpportunisticLockTimeout(int value)
Sets the value of the "opportunistic lock timeout" attribute.void
setServerAuthorizationList(java.lang.String value)
Sets the value of the "Server Authorization List" attribute.void
setWINSPrimaryAddress(java.lang.String value)
Sets the value of the "WINS primary address" attribute.void
setWINSScopeID(java.lang.String value)
Sets the value of the "WINS scope ID" attribute.void
setWINSSecondaryAddress(java.lang.String value)
Sets the value of the "WINS secondary address" attribute.void
setWINSServer(boolean value)
Sets the value of the "WINS enablement" attribute.void
start()
Starts the NetServer job on the system.void
start(boolean reset)
Starts the NetServer job on the system, and (optionally) resets it.java.lang.String
toString()
Returns the String representation of this ISeriesNetServer object.
-
-
-
Field Detail
-
ENCRYPTED_PASSWORDS
public static final int ENCRYPTED_PASSWORDS
Value of the NetServer "authentication method" attribute, indicating that the system authenticates with encrypted passwords only.- See Also:
- Constant Field Values
-
NETWORK_AUTHENTICATION
public static final int NETWORK_AUTHENTICATION
Value of the NetServer "authentication method" attribute, indicating that the system authenticates with Network authentication only.- See Also:
- Constant Field Values
-
KERBEROS_V5_TOKENS
public static final int KERBEROS_V5_TOKENS
Deprecated. Renamed to NETWORK_AUTHENTICATIONValue of the NetServer "authentication method" attribute, indicating that the system authenticates with Network authentication only.- See Also:
- Constant Field Values
-
NETWORK_AUTHENTICATION_OR_PASSWORDS
public static final int NETWORK_AUTHENTICATION_OR_PASSWORDS
Value of the NetServer "authentication method" attribute, indicating that the system authenticates with Network authentication when possible, but it allows clients to use encrypted passwords when needed.
Note: This value is valid only for IBM i release V5R3 and higher.- See Also:
- Constant Field Values
-
KERBEROS_OR_PASSWORDS
public static final int KERBEROS_OR_PASSWORDS
Deprecated. Renamed to NETWORK_AUTHENTICATION_OR_PASSWORDSValue of the NetServer "authentication method" attribute, indicating that the system authenticates with Network authentication when possible, but it allows clients to use encrypted passwords when needed.
Note: This value is valid only for IBM i release V5R3 and higher.- See Also:
- Constant Field Values
-
NO_AUTO_DISCONNECT
public static final int NO_AUTO_DISCONNECT
Value of the "idle timeout" attribute, indicating "no autodisconnect".- See Also:
- Constant Field Values
-
OPP_LOCK_DISABLED
public static final int OPP_LOCK_DISABLED
Value of the "opportunistic lock timeout" attribute, indicating that opportunistic locking is disabled.- See Also:
- Constant Field Values
-
MSG_AUTH_NOT_SUPPORTED
public static final int MSG_AUTH_NOT_SUPPORTED
Value of the "message authentication" attribute, indicating that the system does not support message authentication.- See Also:
- Constant Field Values
-
MSG_AUTH_NEGOTIATED
public static final int MSG_AUTH_NEGOTIATED
Value of the "message authentication" attribute, indicating that the system supports message authentication, and message authentication is negotiated between the client and the system.- See Also:
- Constant Field Values
-
MSG_AUTH_REQUIRED
public static final int MSG_AUTH_REQUIRED
Value of the "message authentication" attribute, indicating that the system requires message authentication for all connections.- See Also:
- Constant Field Values
-
NO_ADMIN_ALERTS
public static final int NO_ADMIN_ALERTS
Value of the "minimum message severity" attribute, indicating that administrative alert messages are not sent.- See Also:
- Constant Field Values
-
PASSWORD_STRONGER
public static final int PASSWORD_STRONGER
Value of the "LAN Manager authentication" attribute, indicating that the LANMAN password hash is ignored if a stronger password hash is provided by the client.- See Also:
- Constant Field Values
-
PASSWORD_STRONGER_OR_MISMATCH
public static final int PASSWORD_STRONGER_OR_MISMATCH
Value of the "LAN Manager authentication" attribute, indicating that the LANMAN password hash is used only if a stronger password hash provided by the client does not match, or if a stronger password hash is not provided.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ISeriesNetServer
public ISeriesNetServer(AS400 system)
Constructs a NetServer object.- Parameters:
system
- The system with which the NetServer is associated.
-
-
Method Detail
-
createFileShare
public void createFileShare(java.lang.String shareName, java.lang.String path) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Creates a file share.- Parameters:
shareName
- The name of the share.path
- The path of the share.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
createFileShare
public void createFileShare(java.lang.String shareName, java.lang.String path, java.lang.String desc, int permission) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Creates a file share.- Parameters:
shareName
- The name of the share.path
- The path of the share.desc
- The description of the share.permission
- The permission of the share. Valid values are:- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
createFileShare
public void createFileShare(java.lang.String shareName, java.lang.String path, java.lang.String desc) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Creates a file share.- Parameters:
shareName
- The name of the share.path
- The path of the share.desc
- The description of the share.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
createFileShare
public void createFileShare(java.lang.String shareName, java.lang.String path, java.lang.String desc, int permission, int maxUsers) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Creates a file share.- Parameters:
shareName
- The name of the share.path
- The path of the share.desc
- The description of the share.permission
- The permission of the share. Valid values are: The default is READ_ONLY.maxUsers
- The maximum number of users of the share.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
createPrintShare
public void createPrintShare(java.lang.String shareName, java.lang.String outqLib, java.lang.String outqName) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Creates a print share. The spooled file type is set toISeriesNetServerPrintShare.AUTO_DETECT
.- Parameters:
shareName
- The name of the share.outqLib
- The library that contains the output queue for the share.outqName
- The name of the output queue for the share.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
createPrintShare
public void createPrintShare(java.lang.String shareName, java.lang.String outqLib, java.lang.String outqName, java.lang.String desc, int splfType) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Creates a print share.- Parameters:
shareName
- The name of the share.outqLib
- The library that contains the output queue for the share.outqName
- The name of the output queue for the share.desc
- The description of the share.splfType
- The type of spooled files that are created using this share. Valid values are:- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
createPrintShare
public void createPrintShare(java.lang.String shareName, java.lang.String outqLib, java.lang.String outqName, java.lang.String desc, int splfType, java.lang.String prtDriver, java.lang.String prtFileLib, java.lang.String prtFileName) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Creates a print share.- Parameters:
shareName
- The name of the share.outqLib
- The library that contains the output queue for the share.outqName
- The name of the output queue for the share.desc
- The description of the share.splfType
- The type of spooled files that are created using this share. Valid values are:prtDriver
- The print driver that is appropriate for this share.prtFileLib
- The library that contains the printer file.prtFileName
- The name of the printer file. This is a template containing attributes used to create spooled files.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
createPrintShare
public void createPrintShare(java.lang.String shareName, java.lang.String outqLib, java.lang.String outqName, java.lang.String desc, int splfType, java.lang.String prtDriver, java.lang.String prtFileLib, java.lang.String prtFileName, boolean publish) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Creates a print share.- Parameters:
shareName
- The name of the share.outqLib
- The library that contains the output queue for the share.outqName
- The name of the output queue for the share.desc
- The description of the share.splfType
- The type of spooled files that are created using this share. Valid values are:prtDriver
- The print driver that is appropriate for this share.prtFileLib
- The library that contains the printer file.prtFileName
- The name of the printer file. This is a template containing attributes used to create spooled files.publish
- Whether to publish this print share. Default is false.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
getSystem
public AS400 getSystem()
Returns the system.- Returns:
- The system.
-
listFileShares
public ISeriesNetServerFileShare[] listFileShares() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Lists all file shares.- Returns:
- The file shares.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
listFileShares
public ISeriesNetServerFileShare[] listFileShares(java.lang.String shareName) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Lists the file shares.- Parameters:
shareName
- The name of the share to list.- Returns:
- The file shares.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
listPrintShares
public ISeriesNetServerPrintShare[] listPrintShares() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Lists all print shares.- Returns:
- The print shares.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
listPrintShares
public ISeriesNetServerPrintShare[] listPrintShares(java.lang.String shareName) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Lists the print shares.- Parameters:
shareName
- The name of the share to list.- Returns:
- The print shares.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
listShares
public ISeriesNetServerShare[] listShares() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Lists the shares (both file shares and print shares).- Returns:
- The shares.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
listSessions
public ISeriesNetServerSession[] listSessions() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Lists all NetServer sessions.- Returns:
- The current sessions.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
listSessionsForWorkstation
public ISeriesNetServerSession[] listSessionsForWorkstation(java.lang.String name) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Lists all NetServer sessions for the specified workstation.- Parameters:
name
- The name of the workstation.- Returns:
- The current sessions for the workstation.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
listConnectionsForSession
public ISeriesNetServerConnection[] listConnectionsForSession(long sessionID) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Lists all connections for the specified NetServer session.- Parameters:
sessionID
- The session ID. Note: The "session identifier" was added to the NetServer API's in V5R1.- Returns:
- The current connections for the specified session.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
listConnectionsForSession
public ISeriesNetServerConnection[] listConnectionsForSession(java.lang.String workstationName) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Lists all connections for the specified NetServer workstation.- Parameters:
workstationName
- The name of the workstation.- Returns:
- The current connections for the specified session.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
listConnectionsForShare
public ISeriesNetServerConnection[] listConnectionsForShare(java.lang.String shareName) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Returns the connections associated with a specific share.- Parameters:
shareName
- The name of the share.- Returns:
- The connections for the specified share.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
removeShare
public void removeShare(java.lang.String shareName) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Removes the specified share.- Parameters:
shareName
- The name of the share.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
isAllowSystemName
public boolean isAllowSystemName()
Returns the value of the "allow system name" attribute. This attribute indicates whether access is allowed to the system using the system's TCP/IP system name.- Returns:
- The value of the "allow system name" attribute.
-
isAllowSystemNamePending
public boolean isAllowSystemNamePending()
Returns the pending value of the "allow system name" attribute.- Returns:
- The pending value of the "allow system name" attribute.
- See Also:
isAllowSystemName()
-
setAllowSystemName
public void setAllowSystemName(boolean value)
Sets the value of the "allow system name" attribute. This attribute indicates whether access is allowed to the system using the system's TCP/IP system name.- Parameters:
value
- The value of the "allow system name" attribute.
-
getAuthenticationMethod
public int getAuthenticationMethod()
Returns the value of the "authentication method" attribute. This attribute indicates the method used to authenticate users. Note: This attribute is available only if the system is at release V5R2 or higher.- Returns:
- The value of the "authentication method" attribute.
Valid values are
ENCRYPTED_PASSWORDS
,NETWORK_AUTHENTICATION
, andNETWORK_AUTHENTICATION_OR_PASSWORDS
.
-
getAuthenticationMethodPending
public int getAuthenticationMethodPending()
Returns the pending value of the "authentication method" attribute.- Returns:
- The pending value of the "authentication method" attribute.
- See Also:
getAuthenticationMethod()
-
setAuthenticationMethod
public void setAuthenticationMethod(int value)
Sets the value of the "authentication method" attribute. This attribute indicates the authentication method used to authenticate users. Note: This attribute is available only if the system is at release V5R2 or higher.- Parameters:
value
- The value of the "authentication method" attribute. Valid values areENCRYPTED_PASSWORDS
,NETWORK_AUTHENTICATION
, andNETWORK_AUTHENTICATION_OR_PASSWORDS
.
-
isAutoStart
public boolean isAutoStart() throws AS400SecurityException
Returns the value of the "autostart" attribute. This attribute indicates whether or not the NetServer is to be started automatically when TCP is started.
Note: This method requires that the user have *IOSYSCFG authority on the system. If the user doesn't have that authority, this method throws AS400SecurityException.- Returns:
- The value of the "autostart" attribute.
- Throws:
AS400SecurityException
- If a security or authority error occurs.
-
isAutoStartPending
public boolean isAutoStartPending() throws AS400SecurityException
Returns the pending value of the "autostart" attribute.- Returns:
- The pending value of the "autostart" attribute.
- Throws:
AS400SecurityException
- If a security or authority error occurs.- See Also:
isAutoStart()
-
setAutoStart
public void setAutoStart(boolean value)
Sets the value of the "autostart" attribute. This attribute indicates whether or not the NetServer is to be started automatically when TCP is started. Note: This is the only NetServer attribute for which changes take effect immediately uponcommitChanges
. That is, a NetServer restart is not necessary.- Parameters:
value
- The pending value of the "autostart" attribute.
-
getBrowsingInterval
public int getBrowsingInterval()
Returns the value of the "browsing interval" attribute. This attribute represents the amount of time, in milliseconds, between each system announcement that is used for browsing. A value of zero indicates that there will be no system announcements.- Returns:
- The value of the "browsing interval" attribute.
-
getBrowsingIntervalPending
public int getBrowsingIntervalPending()
Returns the pending value of the "browsing interval" attribute.- Returns:
- The pending value of the "browsing interval" attribute.
- See Also:
getBrowsingInterval()
-
setBrowsingInterval
public void setBrowsingInterval(int value)
Sets the value of the "browsing interval" attribute. This attribute represents the amount of time, in milliseconds, between each system announcement that is used for browsing. A value of zero indicates that there will be no system announcements.- Parameters:
value
- The value of the "browsing interval" attribute.
-
getCCSID
public int getCCSID()
Returns the value of the "system CCSID" attribute. This attribute represents the coded character set identifier for the NetServer. This is the CCSID that is used for all clients connected to the system.
A value of 0 indicates that the user would like to use the associated ASCII CCSID for the CCSID of the job used to start the system.- Returns:
- The value of the "system CCSID" attribute.
-
getCCSIDPending
public int getCCSIDPending()
Returns the pending value of the "system CCSID" attribute.- Returns:
- The pending value of the "system CCSID" attribute.
- See Also:
getCCSID()
-
setCCSID
public void setCCSID(int value)
Sets the value of the "system CCSID" attribute. This attribute represents the coded character set identifier for the NetServer. This is the CCSID that is used for all clients connected to the system. The default value is the associated ASCII CCSID for the CCSID of the job used to start the system.
A value of 0 indicates that the user would like to use the associated ASCII CCSID for the CCSID of the job used to start the system.- Parameters:
value
- The value of the "system CCSID" attribute.
-
getDescription
public java.lang.String getDescription()
Returns the value of the "description" attribute. This attribute represents the text description of the NetServer.- Returns:
- The value of the "description" attribute.
-
getDescriptionPending
public java.lang.String getDescriptionPending()
Returns the pending value of the "description" attribute.- Returns:
- The pending value of the "description" attribute.
- See Also:
getDescription()
-
setDescription
public void setDescription(java.lang.String value)
Sets the value of the "description" attribute. This attribute represents the text description of the NetServer- Parameters:
value
- The value of the "description" attribute. Maximum length is 50 characters.
-
getDomainName
public java.lang.String getDomainName()
Returns the value of the "domain name" attribute. This attribute represents the domain name of the NetServer.- Returns:
- The value of the "domain name" attribute.
-
getDomainNamePending
public java.lang.String getDomainNamePending()
Returns the pending value of the "domain name" attribute.- Returns:
- The pending value of the "domain name" attribute.
- See Also:
getDomainName()
-
setDomainName
public void setDomainName(java.lang.String value)
Sets the value of the "domain name" attribute. This attribute represents the domain name of the NetServer.- Parameters:
value
- The value of the "domain name" attribute.
-
getGuestUserProfile
public java.lang.String getGuestUserProfile()
Returns the value of the "guest user profile" attribute. This attribute represents the guest user profile for the NetServer. If no guest user profile is currently configured on the system, the value of this attribute is "" (an empty String).- Returns:
- The value of the "guest user profile" attribute.
-
getGuestUserProfilePending
public java.lang.String getGuestUserProfilePending()
Returns the pending value of the "guest user profile" attribute.- Returns:
- The pending value of the "guest user profile" attribute.
- See Also:
getGuestUserProfile()
-
setGuestUserProfile
public void setGuestUserProfile(java.lang.String value)
Sets the value of the "guest user profile" attribute. This attribute represents the guest user profile for the NetServer. If no guest user profile is currently configured on the system, the value of this attribute is "" (an empty String).Note: Guest support allows customers to have users accessing files and printers on the system, without the requirement of a user profile on the system. It limits access to data and allows customers to support a set of users who may only need print support but do not otherwise need system access.
- Parameters:
value
- The value of the "guest user profile" attribute.
-
getIdleTimeout
public int getIdleTimeout()
Returns the value of the "idle timeout" attribute. This attribute represents the amount of time, in seconds, that a connection to the NetServer will remain active once activity has ceased on that connection. An idle time-out value of (NO_AUTO_DISCONNECT
) indicates no autodisconnect.- Returns:
- The value of the "idle timeout" attribute.
-
getIdleTimeoutPending
public int getIdleTimeoutPending()
Returns the pending value of the "idle timeout" attribute.- Returns:
- The pending value of the "idle timeout" attribute.
- See Also:
getIdleTimeout()
-
setIdleTimeout
public void setIdleTimeout(int value)
Sets the value of the "idle timeout" attribute. This attribute represents the amount of time, in seconds, that a connection to the NetServer will remain active once activity has ceased on that connection. An idle time-out value of (NO_AUTO_DISCONNECT
) indicates no autodisconnect.- Parameters:
value
- The value of the "idle timeout" attribute.
-
getLANManagerAuthentication
public int getLANManagerAuthentication()
Returns the value of the "LAN Manager authentication" attribute. This attribute represents the level of restriction on the use of the LANMAN password hash for authentication. Possible values arePASSWORD_STRONGER
andPASSWORD_STRONGER_OR_MISMATCH
.
Note: This attribute is not supported prior to IBM i release V5R4.- Returns:
- The value of the "LAN Manager authentication" attribute.
-
getLANManagerAuthenticationPending
public int getLANManagerAuthenticationPending()
Returns the pending value of the "LAN Manager authentication" attribute.
Note: This attribute is not supported prior to IBM i release V5R4.- Returns:
- The pending value of the "LAN Manager authentication" attribute.
- See Also:
getLANManagerAuthentication()
-
setLANManagerAuthentication
public void setLANManagerAuthentication(int value)
Sets the value of the "LAN Manager authentication" attribute. This attribute represents the level of restriction on the use of the LANMAN password hash for authentication. Possible values arePASSWORD_STRONGER
andPASSWORD_STRONGER_OR_MISMATCH
.
Note: This attribute is not supported prior to IBM i release V5R4.- Parameters:
value
- The value of the "LAN Manager authentication" attribute.
-
isLogonServer
public boolean isLogonServer()
Returns the value of the "logon support" attribute. This attribute indicates the logon system role for the system. If true, then the server is a logon server; if false, the server is not a logon server.
Note: This attribute corresponds to the "server role" field specified in the NetServer API's.- Returns:
- The value of the "logon support" attribute.
-
isLogonServerPending
public boolean isLogonServerPending()
Returns the pending value of the "logon support" attribute.- Returns:
- The pending value of the "logon support" attribute.
- See Also:
isLogonServer()
-
setLogonServer
public void setLogonServer(boolean value)
Sets the value of the "logon support" attribute. This attribute indicates the logon server role for the server. If true, then the server is a logon server; if false, the server is not a logon server.
Note: This attribute corresponds to the "server role" field specified in the NetServer API's.- Parameters:
value
- The value of the "logon support" attribute.
-
getMessageAuthentication
public int getMessageAuthentication()
Returns the value of the "message authentication" attribute. This attribute represents the status of message authentication. Possible values areMSG_AUTH_NOT_SUPPORTED
,MSG_AUTH_NEGOTIATED
, andMSG_AUTH_REQUIRED
.
Note: This attribute is not supported prior to IBM i release V5R4.- Returns:
- The value of the "message authentication" attribute.
-
getMessageAuthenticationPending
public int getMessageAuthenticationPending()
Returns the pending value of the "message authentication" attribute.
Note: This attribute is not supported prior to IBM i release V5R4.- Returns:
- The pending value of the "message authentication" attribute.
- See Also:
getMessageAuthentication()
-
setMessageAuthentication
public void setMessageAuthentication(int value)
Sets the value of the "message authentication" attribute. This attribute represents the status of message authentication. Possible values areMSG_AUTH_NOT_SUPPORTED
,MSG_AUTH_NEGOTIATED
, andMSG_AUTH_REQUIRED
.
Note: This attribute is not supported prior to IBM i release V5R4.- Parameters:
value
- The value of the "message authentication" attribute.
-
getMinimumMessageSeverity
public int getMinimumMessageSeverity()
Returns the value of the "minimum message severity" attribute. This attribute represents the minimum message severity of administrative alerts to send to users of the system. A value of (NO_ADMIN_ALERTS
) indicates that administrative alert messages are not sent.
Note: This attribute is not supported prior to IBM i release V5R4.- Returns:
- The value of the "minimum message severity" attribute.
-
getMinimumMessageSeverityPending
public int getMinimumMessageSeverityPending()
Returns the pending value of the "minimum message severity" attribute.
Note: This attribute is not supported prior to IBM i release V5R4.- Returns:
- The pending value of the "minimum message severity" attribute.
- See Also:
getMinimumMessageSeverity()
-
setMinimumMessageSeverity
public void setMinimumMessageSeverity(int value)
Sets the value of the "minimum message severity" attribute. This attribute represents the minimum message severity of administrative alerts to send to users of the system. A value of (NO_ADMIN_ALERTS
) indicates that administrative alert messages are not sent.
Note: This attribute is not supported prior to IBM i release V5R4.- Parameters:
value
- The value of the "minimum message severity" attribute.
-
getName
public java.lang.String getName()
Returns the value of the "NetServer name" attribute. This attribute represents the name of the NetServer.
Note: The NetServer name is always uppercase on the system.- Returns:
- The value of the "NetServer name" attribute.
-
getNamePending
public java.lang.String getNamePending()
Returns the pending value of the "NetServer name" attribute.- Returns:
- The pending value of the "NetServer name" attribute.
- See Also:
getName()
-
setName
public void setName(java.lang.String value)
Sets the value of the "NetServer name" attribute. This attribute represents the name of the NetServer.
Note: The NetServer name is always uppercase on the system.- Parameters:
value
- The value of the "NetServer name" attribute.
-
getOpportunisticLockTimeout
public int getOpportunisticLockTimeout()
Returns the value of the "opportunistic lock timeout" attribute. This attribute represents the amount of time, in seconds, that the system will wait for a response to a break lock request sent to a lock holder, before forcefully removing the lock. A value of (OPP_LOCK_DISABLED
) indicates that opportunistic locking is disabled. The default value is 30 seconds.
Note: This attribute is not supported prior to IBM i release V5R4.- Returns:
- The value of the "opportunistic lock timeout" attribute.
-
getOpportunisticLockTimeoutPending
public int getOpportunisticLockTimeoutPending()
Returns the pending value of the "opportunistic lock timeout" attribute.
Note: This attribute is not supported prior to IBM i release V5R4.- Returns:
- The pending value of the "opportunistic lock timeout" attribute.
- See Also:
getOpportunisticLockTimeout()
-
setOpportunisticLockTimeout
public void setOpportunisticLockTimeout(int value)
Sets the value of the "opportunistic lock timeout" attribute. This attribute represents the amount of time, in seconds, that the system will wait for a response to a break lock request sent to a lock holder, before forcefully removing the lock. A value of (OPP_LOCK_DISABLED
) indicates that opportunistic locking is disabled. The default value is 30 seconds.
Note: This attribute is not supported prior to IBM i release V5R4.- Parameters:
value
- The value of the "opportunistic lock timeout" attribute.
-
isWINSServer
public boolean isWINSServer()
Returns the value of the "WINS enablement" attribute. This attribute indicates whether the system uses a WINS server. Note: This attribute is also referred to as the "server role".- Returns:
- The value of the "WINS enablement" attribute.
-
isWINSServerPending
public boolean isWINSServerPending()
Returns the pending value of the "WINS enablement" attribute.- Returns:
- The pending value of the "WINS enablement" attribute.
- See Also:
isWINSServer()
-
setWINSServer
public void setWINSServer(boolean value)
Sets the value of the "WINS enablement" attribute. This attribute indicates whether the system uses a WINS server. Note: This attribute is also referred to as the "server role".- Parameters:
value
- The value of the "WINS enablement" attribute.
-
getWINSPrimaryAddress
public java.lang.String getWINSPrimaryAddress()
Returns the value of the "WINS primary address" attribute. This attribute represents the IP address of the primary WINS server.- Returns:
- The value of the "WINS primary address" attribute.
-
getWINSPrimaryAddressPending
public java.lang.String getWINSPrimaryAddressPending()
Returns the pending value of the "WINS primary address" attribute.- Returns:
- The pending value of the "WINS primary address" attribute.
- See Also:
getWINSPrimaryAddress()
-
setWINSPrimaryAddress
public void setWINSPrimaryAddress(java.lang.String value)
Sets the value of the "WINS primary address" attribute. This attribute represents the IP address of the primary WINS server.- Parameters:
value
- The value of the "WINS primary address" attribute.
-
getWINSScopeID
public java.lang.String getWINSScopeID()
Returns the value of the "WINS scope ID" attribute. This attribute represents the network scope used by the WINS server. If no scope ID is currently configured on the system, the value of this attribute is "" (an empty String).- Returns:
- The value of the "WINS scope ID" attribute.
-
getWINSScopeIDPending
public java.lang.String getWINSScopeIDPending()
Returns the pending value of the "WINS scope ID" attribute.- Returns:
- The pending value of the "WINS scope ID" attribute.
- See Also:
getWINSScopeID()
-
setWINSScopeID
public void setWINSScopeID(java.lang.String value)
Sets the value of the "WINS scope ID" attribute. This attribute represents the network scope used by the WINS server. If no scope ID is currently configured on the system, the value of this attribute is "" (an empty String).- Parameters:
value
- The value of the "WINS scope ID" attribute.
-
getWINSSecondaryAddress
public java.lang.String getWINSSecondaryAddress()
Returns the value of the "WINS secondary address" attribute. This attribute represents the IP address of the secondary WINS server.- Returns:
- The value of the "WINS secondary address" attribute.
-
getWINSSecondaryAddressPending
public java.lang.String getWINSSecondaryAddressPending()
Returns the pending value of the "WINS secondary address" attribute.- Returns:
- The pending value of the "WINS secondary address" attribute.
- See Also:
getWINSSecondaryAddress()
-
setWINSSecondaryAddress
public void setWINSSecondaryAddress(java.lang.String value)
Sets the value of the "WINS secondary address" attribute. This attribute represents the IP address of the secondary WINS server.- Parameters:
value
- The value of the "WINS secondary address" attribute.
-
refresh
public void refresh() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Refreshes the attribute values of this ISeriesNetServer object, from the current in-effect values on the system.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
commitChanges
public void commitChanges() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Commits all attribute value changes to the system. Note that for most attributes, changes do not take effect until the NetServer process on the system is stopped (end
) and restarted (start
).- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
end
public void end() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Ends the NetServer job on the IBM i system.
This method requires *IOSYSCFG special authority on the system.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
endSession
public void endSession(long sessionID) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Ends a specific NetServer session.
This method requires *IOSYSCFG special authority on the system.- Parameters:
sessionID
-- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
endSessionsForWorkstation
public void endSessionsForWorkstation(java.lang.String workstationName) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Ends all the sessions that were established from the specified workstation.
This method requires *IOSYSCFG special authority on the system.- Parameters:
workstationName
-- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
isStarted
public boolean isStarted() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Indicates whether or not the NetServer job on the system is started.- Returns:
- true if the NetServer job is started; false otherwise.
- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
start
public void start() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Starts the NetServer job on the system. If the NetServer is already started, this method does nothing. This method requires *IOSYSCFG special authority on the system. If the QSERVER subsystem is not running, this method will attempt to start the subsystem.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
start
public void start(boolean reset) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Starts the NetServer job on the system, and (optionally) resets it. If the NetServer is already started, this method does nothing. This method requires *IOSYSCFG special authority on the system. If the QSERVER subsystem is not running, this method will attempt to start it.Note: Reset is used when the NetServer fails to start normally on the system. It is on the NetServer context menu so an administrator can use it. The reset does some under-the-covers cleanup, and is used infrequently. The times it would be used is if the system ended abnormally and there may be jobs or objects hanging around that need to be cleaned up before the system can start again. The reset does that.
- Parameters:
reset
- Whether or not the system is to be reset when started. Default is no reset.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
refresh
public void refresh(ISeriesNetServerConnection connection) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Refreshes the attribute values of the connection object, from the current values on the system.- Parameters:
connection
- The connection.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
refresh
public void refresh(ISeriesNetServerSession session) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Refreshes the attribute values of the session object, from the current values on the system.- Parameters:
session
- The session.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
refresh
public void refresh(ISeriesNetServerShare share) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Refreshes the attribute values of the share object, from the currently in-effect values on the system. Note: This overwrites any attribute changes that have been made but not yet committed.- Parameters:
share
- The share.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
toString
public java.lang.String toString()
Returns the String representation of this ISeriesNetServer object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The String representation of this ISeriesNetServer object.
-
commitChanges
public void commitChanges(ISeriesNetServerFileShare share) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Commits attribute value changes to the system, for the specified share.- Parameters:
share
- The share.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
commitChanges
public void commitChanges(ISeriesNetServerPrintShare share) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
Commits attribute value changes to the system, for the specified share.- Parameters:
share
- The share.- Throws:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
-
getEncryptedConnectionEnforcement
public int getEncryptedConnectionEnforcement()
Returns the value of the "encrypted connection enforce" attribute. Whether the server requires access to the share to use encryption.- Returns:
- The value of the "encrypted connection enforce" attribute.
-
getEncryptedConnectionEnforcementPending
public int getEncryptedConnectionEnforcementPending()
Returns the pending value of the "Encrypted connection enforcement" attribute.- Returns:
- The pending value of the "Encrypted connection enforcement" attribute.
- See Also:
getEncryptedConnectionEnforcement()
-
setEncryptedConnectionEnforcement
public void setEncryptedConnectionEnforcement(int value)
Sets the value of the "Encrypted connection enforcement" attribute.- Parameters:
value
- The value of the "Encrypted connection enforcement" attribute.
-
getServerAuthorizationList
public java.lang.String getServerAuthorizationList()
Returns the value of the "Server Authorization List" attribute. Whether the server requires access to the share to use encryption.- Returns:
- The value of the "encrypted connection enforce" attribute.
-
getServerAuthorizationListPending
public java.lang.String getServerAuthorizationListPending()
Returns the pending value of the "Server Authorization List" attribute.- Returns:
- The pending value of the "Encrypted connection enforcement" attribute.
- See Also:
getEncryptedConnectionEnforcement()
-
setServerAuthorizationList
public void setServerAuthorizationList(java.lang.String value)
Sets the value of the "Server Authorization List" attribute.- Parameters:
value
- The value of the "Encrypted connection enforcement" attribute.
-
-