Package co.ecg.alpaca.toolkit.model
Class BroadWorksServer
java.lang.Object
co.ecg.alpaca.toolkit.model.BroadWorksServer
- All Implemented Interfaces:
Serializable
,AutoCloseable
@Component
@Scope("prototype")
public class BroadWorksServer
extends Object
implements Serializable, AutoCloseable
The BroadWorksServer Class represents the connection to BroadWorks. It might
be an External Web Server (XSP) or directly to an Application Server.
A new instance of BroadWorksServer is needed for each User performing
changes.
- Author:
- Matthew Keathley
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBroadWorksServer
(LibraryProperties libraryProperties, OCSSwitchboard ocsSwitchboard, RequestBundler requestBundler, org.apache.jcs.JCS responseCache, HostIdCachingService hostIdCachingService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Clears the JCS Response Cache This causes all subsequent requests to get fresh resultsvoid
close()
Closes the BroadWorksServer and frees the used socket.void
connect
(LibraryProperties.BroadWorksServerConfig configuration) Delegate factory method for the creation of a BroadWorksServer.boolean
fromTimeZone
(TimeZone timeZone) getTimesTenConnection
(boolean trySecondary) Returns theConnection
instance for this BroadWorksServerint
hashCode()
boolean
timeZoneExists
(String timeZoneString) toTimeZone
(String timeZone)
-
Constructor Details
-
BroadWorksServer
@Autowired public BroadWorksServer(LibraryProperties libraryProperties, OCSSwitchboard ocsSwitchboard, RequestBundler requestBundler, org.apache.jcs.JCS responseCache, HostIdCachingService hostIdCachingService) throws co.ecg.licensing.LicenseException, BroadWorksServerException - Throws:
co.ecg.licensing.LicenseException
BroadWorksServerException
-
-
Method Details
-
connect
public void connect(LibraryProperties.BroadWorksServerConfig configuration) throws BroadWorksServerException, IOException, co.ecg.licensing.LicenseException, RequestException Delegate factory method for the creation of a BroadWorksServer. Uses the current system time as the session id.- Parameters:
configuration
- TheLibraryProperties.BroadWorksServerConfig
object as retrieved through an AlpacaProperties configuration.- Throws:
BroadWorksServerException
IOException
co.ecg.licensing.LicenseException
RequestException
-
getTimesTenConnection
- Throws:
TimesTenException
-
getTimesTenConnection
Returns theConnection
instance for this BroadWorksServer- Throws:
TimesTenException
- Thrown if unable to open the TimesTenConnection
-
clearCache
public boolean clearCache()Clears the JCS Response Cache This causes all subsequent requests to get fresh results- Returns:
- Returns true if the cache was successfully cleared
-
close
Closes the BroadWorksServer and frees the used socket.- Specified by:
close
in interfaceAutoCloseable
- Throws:
BroadWorksServerException
- Thrown if an error occurs while closing the client.
-
getRelease
-
toTimeZone
- Throws:
BroadWorksServerException
-
fromTimeZone
- Throws:
BroadWorksServerException
-
timeZoneExists
- Throws:
BroadWorksServerException
-
equals
-
hashCode
public int hashCode() -
getNickName
-