Package de.mid.innovator.srv
Class SrvConnection
java.lang.Object
de.mid.innovator.net.InoNet
de.mid.innovator.srv.SrvConnection
The class represents a connection to the Innovator repository server. You can
connect to a model which that repository server recognizes after
instantiation; this is done so that you can call Innovator Java API commands.
The class encapsulates the connection data returned by the license server (or
the login).
- Since:
- 17.12.2004
- Author:
- MID
- See Also:
-
Field Summary
Fields inherited from class de.mid.innovator.net.InoNet
EnabledCypherSuits -
Constructor Summary
ConstructorsConstructorDescriptionSrvConnection(de.mid.innovator.srv.LicSrvGetSrvPrjListReplyTelegram.SrvConData srvConData) SrvConnection(de.mid.innovator.srv.LicSrvGetSrvPrjListReplyTelegram.SrvConData srvCon, InoProxyProgram proxy) SrvConnection(InetSocketAddress ipAddr, String ipAddrStr, LicenseServer licSrv, String repName) Creates a connection to the repository server if the IP address and connection port are known. -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()Connects the SrvConnection with the repository server and initializes the communication between Java client and repository server.voidDisconnects the SrvConnection from the repository server; no more commands can be called.booleanstatic SrvConnectionGetProxySrvConnection(LicenseServer lSrv, de.mid.innovator.srv.LicSrvGetSrvPrjListReplyTelegram.SrvConData srvCon) static SrvConnectionGetProxySrvConnection(LicenseServer lSrv, SrvConnection srvCon) booleanChecks if the SrvConnection is connected to the repository server.de.mid.innovator.srv2api.impl.SrvDataTelegramSendAndReceive(SrvContext ctx, de.mid.innovator.srv2api.impl.SrvDataTelegram tel) voidsetRepName(String repName) de.mid.innovator.srv2api.impl.SrvParamBlockSrv2SendAndReceive(SrvContext ctx, de.mid.innovator.srv2api.impl.SrvDataTelegram.DataTelType type, de.mid.innovator.srv2api.impl.SrvDataTelegram.DataTelTab telTab, de.mid.innovator.srv2api.impl.SrvParamBlock pb, de.mid.innovator.srv2api.impl.SrvTelegram.TelFlag... flagLst) Constructs a telegram of the given type using the parameter block and sends it to the repository server.Methods inherited from class de.mid.innovator.net.InoNet
GetMyIpAddress, getSocketAddress, send, sendAndReceive
-
Constructor Details
-
SrvConnection
public SrvConnection(InetSocketAddress ipAddr, String ipAddrStr, LicenseServer licSrv, String repName) throws IllegalArgumentException, InoNetException Creates a connection to the repository server if the IP address and connection port are known. The license server should normally ask for this information.- Parameters:
ipAddr- TCP/IP address with portipAddrStr- alternative ip number as string to be used, if the fqdn cannot be resolvedrepName- the name of the repository server- Throws:
InoNetExceptionIllegalArgumentException- See Also:
-
SrvConnection
public SrvConnection(de.mid.innovator.srv.LicSrvGetSrvPrjListReplyTelegram.SrvConData srvConData) throws IllegalArgumentException, InoNetException -
SrvConnection
public SrvConnection(de.mid.innovator.srv.LicSrvGetSrvPrjListReplyTelegram.SrvConData srvCon, InoProxyProgram proxy) throws IllegalArgumentException, InoNetException
-
-
Method Details
-
getRepName
-
getIpAddress
-
setRepName
-
GetProxySrvConnection
public static SrvConnection GetProxySrvConnection(LicenseServer lSrv, de.mid.innovator.srv.LicSrvGetSrvPrjListReplyTelegram.SrvConData srvCon) throws IllegalArgumentException, InoNetException -
GetProxySrvConnection
public static SrvConnection GetProxySrvConnection(LicenseServer lSrv, SrvConnection srvCon) throws IllegalArgumentException, InoNetException -
connect
Connects the SrvConnection with the repository server and initializes the communication between Java client and repository server. The repository server creates a connection process (or a thread with a connection process). All telegrams are sent to this process. For every successful connect a disconnect should be called if it is not needed anymore.- Overrides:
connectin classInoNet- Throws:
InoNetException- See Also:
-
disconnect
Disconnects the SrvConnection from the repository server; no more commands can be called. The repository server deletes all information belonging to the Java client and removes corresponding threads, frees memory etc. You need to call this method when exiting a Java program to end the connection.- Overrides:
disconnectin classInoNet- Throws:
InoNetException- See Also:
-
isConnected
public boolean isConnected()Checks if the SrvConnection is connected to the repository server.- Overrides:
isConnectedin classInoNet- Returns:
- true, if connected, otherwise false
-
Srv2SendAndReceive
public de.mid.innovator.srv2api.impl.SrvParamBlock Srv2SendAndReceive(SrvContext ctx, de.mid.innovator.srv2api.impl.SrvDataTelegram.DataTelType type, de.mid.innovator.srv2api.impl.SrvDataTelegram.DataTelTab telTab, de.mid.innovator.srv2api.impl.SrvParamBlock pb, de.mid.innovator.srv2api.impl.SrvTelegram.TelFlag... flagLst) throws InoNetException, SrvErrorException Constructs a telegram of the given type using the parameter block and sends it to the repository server. The parameter block is given back to the returned telegram if the receive was successful.- Parameters:
type- telegram's typetelTab- server's telegram dispatcher tablepb- input parameter block- Returns:
- The returned telegram's parameter block
- Throws:
InoNetExceptionSrvErrorException
-
SendAndReceive
public de.mid.innovator.srv2api.impl.SrvDataTelegram SendAndReceive(SrvContext ctx, de.mid.innovator.srv2api.impl.SrvDataTelegram tel) throws InoNetException, SrvErrorException - Throws:
InoNetExceptionSrvErrorException
-
getCachePool
-
equals
-