Blocking API. Introduction. Multithreading Support CHAPTER

Size: px
Start display at page:

Download "Blocking API. Introduction. Multithreading Support CHAPTER"

Transcription

1 CHAPTER 3 Blocking API Revised: November 8, 2010, Introduction This chapter introduces the Reply Timeout, a feature unique to the Blocking Application Programming Interface (API). The rest of the chapter lists all operations of the Blocking API, and provides code examples. Note If you only need to develop an automatic integration, skip this chapter and go directly to Chapter 4, Nonblocking API. Multithreading Support, page 3-1 ReplyTimeout and OperationTimeout Exception, page 3-2 Information About SM Blocking API Methods, page 3-3 Information About QM Blocking API Methods, page 3-34 Blocking API Code Examples, page 3-41 Multithreading Support The Blocking API supports unlimited number of threads calling its methods simultaneously. Note In a multithreaded scenario for the Blocking API, the order of invocation is not guaranteed. Example: Thread-0 calls operation-0 at time-0, and thread-1 calls operation-1 at time-1, where time-1 is later than time-0. In this example, it is possible that operation-1 may be performed before operation-0, as shown in Figure 3-1 (the vertical scale is time): 3-1

2 ReplyTimeout and OperationTimeout Exception Chapter 3 Blocking API Figure 3-1 Multithreading Support Thread 0 : Thread 1 : SM Blocking API : op-0 : operation op-1 : operation op-1 : result op-0 : result The Subscriber Manager (SM) allocates five threads to handle each API instance. It is recommended to develop a multithreaded application that uses the API with several threads in the order of the five threads. Implementing with more threads might result in longer delays for the calling threads. ReplyTimeout and OperationTimeout Exception A blocking operation returns only when the operation result has been retrieved from the SM. If a networking malfunction or other error prevents the operation result from being retrieved, the caller will wait indefinitely. The SM API provides means of working around this situation. The reply timeout feature (the setreplytimeout method) lets the caller set a timeout. It will fire a com.pcube.management.framework.rpc.operationtimeoutexception when a reply does not return within the timeout period. Calling the setreplytimeout method with a long value sets a reply timeout. The reply timeout is interpreted in milliseconds. A zero value indicates that the operation should wait (freeze, hang) until a result arrives - or indefinitely, if no result arrives. There is an alternative way to release a method call that is blocking the caller, who is waiting for a result to arrive: Call the interrupt method of the calling thread: a java.lang.interruptedexception will then be returned to the caller. 3-2

3 Chapter 3 Blocking API Information About SM Blocking API Methods Information About SM Blocking API Methods This section lists the methods of the SM Blocking API. The syntax of each method is followed by a description of each method s input parameters and return values. The Blocking API is a superset of the Nonblocking API. Except for differences in return values and result handling, identical operations in both APIs have the same functions and syntax structure. All the methods throw a java.lang.illegalstateexception when called before a connection with the SM is established. The Blocking API methods can be classified into the following categories: Dynamic IP and property allocation For using the SM API for integration with an authentication, authorization, and accounting (AAA) system, the following methods are relevant. These methods are not designed to add or remove subscribers from the database, but to modify dynamic parameters (such as IP addresses) of the existing subscribers: login, page 3-4 logoutbyname, page 3-7 logoutbynamefromdomain, page 3-9 logoutbymapping, page 3-10 logincable, page 3-12 logoutcable, page 3-14 Static/Manual Subscriber configuration For example, for GUI usage, the following methods are relevant: addsubscriber, page 3-15 removesubscriber, page 3-17 removeallsubscribers, page 3-18 setpropertiestodefault, page 3-32 removecustomproperties, page 3-33 For simple read-only operations, performed independently on the subscriber awareness mode, the following methods are relevant: getnumberofsubscribers, page 3-19 getnumberofsubscribersindomain, page 3-20 getsubscriber, page 3-20 subscriberexists, page 3-22 subscriberloggedin, page 3-23 getsubscribernamebymapping, page 3-24 getsubscribernames (all), page 3-25 getsubscribernames (filter by property), page 3-27 getsubscribernamesindomain, page 3-28 getsubscribernameswithprefix, page 3-29 getsubscribernameswithsuffix, page 3-30 getdomains, page

4 login Chapter 3 Blocking API It is possible to mix methods from different categories in a single application. The classification is presented only for clarification purposes. login, page 3-4 logoutbyname, page 3-7 logoutbynamefromdomain, page 3-9 logoutbymapping, page 3-10 logincable, page 3-12 logoutcable, page 3-14 addsubscriber, page 3-15 removesubscriber, page 3-17 removeallsubscribers, page 3-18 getnumberofsubscribers, page 3-19 getnumberofsubscribersindomain, page 3-20 getsubscriber, page 3-20 subscriberexists, page 3-22 subscriberloggedin, page 3-23 getsubscribernamebymapping, page 3-24 getsubscribernames (all), page 3-25 getsubscribernames (filter by property), page 3-27 getsubscribernamesindomain, page 3-28 getsubscribernameswithprefix, page 3-29 getsubscribernameswithsuffix, page 3-30 getdomains, page 3-31 setpropertiestodefault, page 3-32 removecustomproperties, page 3-33 login The following sections provide login operation information:, page 3-5, page 3-5, page 3-5, page 3-6, page 3-6 Examples, page

5 Chapter 3 Blocking API login The login syntax: public void login(string subscribername, String[] mappings, short[] mappingtypes, String[] propertykeys, String[] propertyvalues, String domain, boolean ismappingadditive, int autologouttime) The login method adds or modifies a domain, mappings, and possibly properties of a subscriber that already exists in the SM database. It can be called with partial data; for example, with only mappings or only properties provided and NULL put in the unchanged fields. If another subscriber with the same (or colliding) mappings already exists in the same domain, the colliding mappings are removed from the other subscriber and assigned to the new subscriber. If the subscriber does not exist in the SM database, it is created with the data provided. subscribername See the explanation of subscriber name formatting in the Subscriber Name Format section on page 2-4. mappings See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. If no mappings are specified, and the ismappingadditive flag is TRUE, the previous mappings are retained. If no such mappings exist, the operation fails. mappingtypes See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. propertykeys See the explanation of property keys and values in the Subscriber Properties section on page 2-7. propertyvalues See the explanation of property keys and values in the Subscriber Properties section on page 2-7. domain See the explanation of subscriber domains in the Subscriber Domains section on page 2-6. If domain is NULL, but the subscriber already has a domain, the existing domain is retained. If the domain is different to the domain that was previously assigned to the subscriber, the subscriber is removed automatically from the SCEs of the previous domain and moved to the SCEs of the new domain. ismappingadditive TRUE Adds the mappings provided by this call to the subscriber record. FALSE Overrides the mappings provided by this call with mappings that already exist in the subscriber record. 3-5

6 login Chapter 3 Blocking API autologouttime Applies only to mappings provided as arguments to this method. Positive value (N) Automatically logs out the mappings (similar to a logout method being called) after N seconds. 0 value Maintains current expiration time for the given mappings. Negative value Disables any expiration time that might have been set for the mappings given. The following is the list of error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE_BAD_SUBSCRIBER_MAPPING ERROR_CODE_SUBSCRIBER_DOMAIN_ASSOCIATION ERROR_CODE_DATABASE_EXCEPTION ERROR_CODE_UNKNOWN This error can be caused by the following: NULL value for domain parameter for the subscriber that does not exist or does not have a domain Invalid values for propertyvalues parameter For a description of error codes, see Appendix A, List of Error Codes. None. Examples To add the IP address to an existing subscriber named alpha without affecting existing mappings: login( "alpha", // subscriber name new String[]{" "}, SMApiConstants.ALL_IP_MAPPINGS, null, null, "subscribers", // domain true, // ismappingadditive is true -1); // autologouttime set to infinite To add the IP address overriding previous mappings: login( "alpha", // subscriber name new String[]{" "}, SMApiConstants.ALL_IP_MAPPINGS, null, null, "subscribers", // domain false, // ismappingadditive is false -1); // autologouttime set to infinite 3-6

7 Chapter 3 Blocking API logoutbyname To extend the auto logout time of that was previously assigned to alpha: login( "alpha", //the previously assigned IP new String[]{" "}, SMApiConstants.ALL_IP_MAPPINGS, null, null, "subscribers", // domain false, // ismappingadditive 300); // autologouttime set to 300 seconds To modify a dynamic property of alpha (for example. package ID): login( "alpha", null, null, new String[]{"packageId"}, // property key new String[]{"10"}, // property value "subscribers", // domain false, -1); To add the IP address to an existing subscriber named alpha without affecting existing mappings and modify a dynamic property of alpha (for example. package ID): login( "alpha", new String[]{" "}, SMApiConstants.ALL_IP_MAPPINGS, new String[]{"packageId"}, // property key new String[]{"10"}, // property value "subscribers", // domain true, // ismappingadditive is set to true -1); logoutbyname The following sections provide logoutbyname operation information:, page 3-7, page 3-8, page 3-8, page 3-8, page 3-8 Examples, page 3-8 The logoutbyname syntax: public boolean logoutbyname(string subscribername, String[] mappings, short[] mappingtypes) 3-7

8 logoutbyname Chapter 3 Blocking API Locates the subscriber in the database and removes mappings from it. If the subscriber does not exist, it does nothing. subscribername See the explanation of the subscriber name formatting in the Subscriber Name Format section on page 2-4. mappings See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. If no mappings are specified, all subscriber mappings are removed. mappingtypes See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. Examples TRUE If the subscriber was found and the subscribers mappings were removed from the subscriber database. FALSE If the subscriber was not found in the subscriber database. The following is the list of error codes that this method might return: ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE _BAD_SUBSCRIBER_MAPPING ERROR_CODE_SUBSCRIBER_DOMAIN_ASSOCIATION ERROR_CODE_DOMAIN_NOT_FOUND ERROR_CODE_NOT_A_SUBSCRIBER_DOMAIN ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. To remove IP address of subscriber alpha: boolean isexist = logoutbyname( "alpha", new String[]{" "}, SMApiConstants.ALL_IP_MAPPINGS); To remove all IP addresses of subscriber alpha: boolean isexist = logoutbyname("alpha", null, null); 3-8

9 Chapter 3 Blocking API logoutbynamefromdomain logoutbynamefromdomain The following sections provide logoutbynamefromdomain operation information:, page 3-9, page 3-9, page 3-9, page 3-9, page 3-10 Example, page 3-10 The logoutbynamefromdomain syntax; public boolean logoutbynamefromdomain(string subscribername, String[] mappings, short[] mappingtypes, String domain) Similar to logoutbyname, but also lets the caller provide the name of the domain to which the subscriber belongs. When the subscriber domain is known, use this method to get improved performance. subscribername See the explanation of subscriber name formatting in the Subscriber Name Format section on page 2-4. mappings See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. If no mappings are specified, all the subscriber mappings are removed. mappingtypes See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. domain See the explanation of subscriber domains in the Subscriber Domains section on page 2-6. The operation fails if either of the following conditions exists: Domain is null, but the subscriber exists in the database and belongs to a domain. Domain specified is incorrect. TRUE If the subscriber was found and removed from the subscriber database. FALSE If the subscriber was not found in the subscriber database. 3-9

10 logoutbymapping Chapter 3 Blocking API Example The following is the list of error codes that this method might return: ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE _BAD_SUBSCRIBER_MAPPING ERROR_CODE_SUBSCRIBER_DOMAIN_ASSOCIATION ERROR_CODE_DOMAIN_NOT_FOUND ERROR_CODE_NOT_A_SUBSCRIBER_DOMAIN ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. To remove IP address of subscriber alpha from domain subscribers: boolean isexist = logoutbynamefromdomain( "alpha", new String[]{" "}, SMApiConstants.ALL_IP_MAPPINGS, "subscribers"); boolean isexist = logoutbynamefromdomain( "alpha", null, null, "subscribers"); logoutbymapping The following sections provide logoutbymapping operation information:, page 3-10, page 3-11, page 3-11, page 3-11, page 3-11 Example, page 3-11 The logoutbymapping syntax: public boolean logoutbymapping(string mapping, short mappingtype, String domain) 3-10

11 Chapter 3 Blocking API logoutbymapping Locates a subscriber based on domain and mapping, and removes the mapping (the subscriber stays in the database). mapping See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. mappingtype See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. domain See the description in the section on page 3-9 of the logoutbynamefromdomain operation. Example TRUE If the subscriber was found and removed from the subscriber database. FALSE If the subscriber was not found in the subscriber database. The following is the list of error codes that this method might return: ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE _BAD_SUBSCRIBER_MAPPING ERROR_CODE_SUBSCRIBER_DOMAIN_ASSOCIATION ERROR_CODE_DOMAIN_NOT_FOUND ERROR_CODE_NOT_A_SUBSCRIBER_DOMAIN ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. To remove IP address from domain subscribers: boolean isexist = logoutbymapping( " ", SMApiConstants. MAPPING_TYPE_IP, "subscribers"); 3-11

12 logincable Chapter 3 Blocking API logincable The following sections provide logincable operation information:, page 3-12, page 3-12, page 3-12, page 3-13, page 3-13 Examples, page 3-13 The logincable syntax: public void logincable(string CPE, String CM, String IP, int lease, String domain, String[] propertykeys, String[] propertyvalues) The logincable method is an operation adapted for the cable environment (calls the cable support module in the SM). This method is designed to log in the Customer Premise Equipment (CPE) and Content Managers (CMs) to the SM. To log in a CPE, specify its CM Media Access Control (MAC) in the CM argument and the CPE MAC in the CPE argument. To log in a CM, specify the CM MAC address in both CPE and CM arguments. Note that the login of a CPE whose CM does not exist in the SM database is ignored: the CM has to exist in the database, either by import or by a CM login operation. For additional information, see the CPE as Subscriber in Cable Environment chapter of Cisco Service Control Management Suite Subscriber Manager User Guide. Note The name of the CPE in the SM database is the concatenation of the CPE and CM values with two underscore ['_'] characters between them. The caller must make sure that the lengths of CPE and CM add up to no more than 38 characters. CPE Unique identifier of the CPE (usually a MAC address) CM Unique identifier of the cable modem (usually a MAC address) IP CPE IP address lease CPE lease time domain See the explanation of the subscriber domains in the Subscriber Domains section on page 2-6. The domain is usually CMTS IP. 3-12

13 Chapter 3 Blocking API logincable Note Domain aliases must be set on the SM in order for the CMTS IP to be correctly interpreted as a domain name. For information about aliases configuration see the Default Domains Configuration section of Cisco SCMS Subscriber Manager User Guide. propertykeys See the explanation of property keys and values in the Subscriber Properties section on page 2-7. If the CPE is provided with partial or no application properties, the values for the missing application properties are copied from the application properties of the CM to which this CPE belongs. Each CM application property thus serves as a default for the CPE under it. propertyvalues See the explanation of property keys and values in the Subscriber Properties section on page 2-7. None. None. Examples To add the IP address to a CM called CM1 with 2 hours lease time: logincable( "CM1", "CM1", " ", 7200, // lease time in seconds "subscribers", null, null); To add the IP address to a CPE called CPE1 which is behind CM1 with lease time of 1 hour: logincable( "CPE1", "CM1", " ", 3600, // lease time in seconds "subscribers", null, null); 3-13

14 logoutcable Chapter 3 Blocking API logoutcable The following sections provide logoutcable operation information:, page 3-14, page 3-14, page 3-14, page 3-14, page 3-14 Example, page 3-14 The logoutcable syntax: public boolean logoutcable(string CPE, String CM, String IP, String domain) Indicates a logout (CPE becoming offline) event to the SM cable support module. CPE See the description in the section on page 3-12 of the logincable method. CM See the description in the section on page 3-12 of the logincable method. IP See the description in the section on page 3-12 of the logincable method. domain See the description in the section on page 3-12 of the logincable method. TRUE If the CPE was found and removed from the subscriber database. FALSE If the CPE was not found in the subscriber database. None. Example To remove the IP address from CPE1, which is behind CM1: boolean isexist = logoutcable( "CPE1", "CM1", " ", "subscribers"); 3-14

15 Chapter 3 Blocking API addsubscriber addsubscriber The following sections provide addsubscriber operation information:, page 3-15, page 3-15 Example, page 3-16, page 3-16, page 3-16, page 3-17 Examples, page 3-17 The addsubscriber syntax: public void addsubscriber(string subscribername, String[] mappings, short[] mappingtypes, String[] propertykeys, String[] propertyvalues, String[] custompropertykeys, String[] custompropertyvalues, String domain) Creates a new subscriber record according to the method parameters and adds the record to the SM database. If a subscriber by this name already exists, it is removed before the new one is added. In contrast to login, which modifies fields and leaves unspecified fields unchanged, the addsubscriber command sets the subscriber exactly as specified by the parameters passed to it. Note It is recommended to call login method for existing subscribers, instead of the addsubscriber command. Dynamic mappings and properties should be set by using the login command. Static mappings and properties should be set the first time the subscriber is created by using the addsubscriber command. Note With the addsubscriber command, the autologout feature is always disabled. To enable autologout, use the login command. 3-15

16 addsubscriber Chapter 3 Blocking API Example Subscriber AB, already set up in the subscriber database, has a single IP mapping: IP1. If an addsubscriber operation for AB is called with no mappings specified (NULL in both the mappings and mappingtypes fields), AB is left with no mappings. However, calling the login operation with these NULL-value parameters will not change ABs mappings; AB will still have its previous IP mapping of IP1. subscribername See the explanation of subscriber name format in the Subscriber Name Format section on page 2-4. mappings See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. mappingtypes See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. propertykeys See the explanation of property keys and values in the Subscriber Properties section on page 2-7. propertyvalues See the explanation of property keys and values in the Subscriber Properties section on page 2-7. custompropertykeys See the explanation of custom property keys and values in the Custom Properties section on page 2-7. custompropertyvalues See the explanation of custom property keys and values in the Custom Properties section on page 2-7. domain See the explanation of subscriber domains in the Subscriber Domains section on page 2-6. A NULL value indicates that the subscriber is domain-less. If domain is NULL, but the subscriber already has a domain, the existing domain is retained. None. 3-16

17 Chapter 3 Blocking API removesubscriber Examples The following is the list of error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE _BAD_SUBSCRIBER_MAPPING ERROR_CODE_DOMAIN_NOT_FOUND ERROR_CODE_SUBSCRIBER_ALREADY_EXISTS ERROR_CODE_SUBSCRIBER_DOMAIN_ASSOCIATION ERROR_CODE_UNKNOWN This error code may indicate invalid values that were supplied for propertyvalues parameter. ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. To add a new subscriber, alpha, with some custom properties: addsubscriber("alpha", null, null, // dynamic mappings will be set by login null, null // dynamic properties will be set by login new String[]{ // custom property keys "work phone", "home phone"}, new String[]{ // custom property values " " " "}, "subscribers"); // default domain removesubscriber The following sections provide removesubscriber operation information:, page 3-17, page 3-18, page 3-18, page 3-18, page 3-18 Example, page 3-18 The removesubscriber syntax: public boolean removesubscriber(string subscribername) 3-17

18 removeallsubscribers Chapter 3 Blocking API Removes a subscriber completely from the SM database. subscribername See the explanation of subscriber name formatting in the Subscriber Name Format section on page 2-4. Example TRUE If the subscriber was found in the database and successfully removed. FALSE If the conditions for TRUE were not met; in other words, the subscriber was not found in the database, or the subscriber was found but was not successfully removed. The following is the list of error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. To remove subscriber alpha entirely from the database: boolean isexist = removesubscriber("alpha"); removeallsubscribers The following sections provide removeallsubscribers operation information:, page 3-18, page 3-19, page 3-19, page 3-19 The removeallsubscribers syntax: public void removeallsubscribers() 3-18

19 Chapter 3 Blocking API getnumberofsubscribers Removes all subscribers from the SM, leaving the database with no subscribers. Note This method may take time to execute. To avoid operation timeout exceptions, set a high operation timeout (up to 5 minutes) before calling this method. None. None. getnumberofsubscribers The following sections provide getnumberofsubscribers operation information:, page 3-19, page 3-19, page 3-19, page 3-19 The getnumberofsubscribers syntax: public int getnumberofsubscribers() Retrieves the total number of subscribers in the SM database. The number of subscribers in the SM. None. 3-19

20 getnumberofsubscribersindomain Chapter 3 Blocking API getnumberofsubscribersindomain The following sections provide getnumberofsubscribersindomain operation information:, page 3-20, page 3-20, page 3-20, page 3-20, page 3-20 The getnumberofsubscribersindomain syntax: public int getnumberofsubscribersindomain(string domain) Retrieves the number of subscribers in a subscriber domain. domain Name of a subscriber domain that exists in the SMs domain repository. The number of subscribers in the domain provided. The following is the list of error codes that this method might return: ERROR_CODE_NOT_A_SUBSCRIBER_DOMAIN ERROR_CODE _DOMAIN_NOT_FOUND For a description of error codes, see Appendix A, List of Error Codes. getsubscriber The following sections provide getsubscriber operation information:, page 3-21, page 3-21, page 3-21, page 3-21, page 3-21 Example, page

21 Chapter 3 Blocking API getsubscriber The getsubscriber syntax: public Object[] getsubscriber(string subscribername) Retrieves a subscriber record. Each field is formatted as an integer, string, or string array, as described below in the section for this method. If the subscriber does not exist in the SM database, an exception is returned. subscribername See the explanation of subscriber name formatting in the Subscriber Name Format section on page 2-4. An Object Array with nine elements. Table 3-1 lists the index values and descriptions. No array element is NULL. Table 3-1 Indexes and s Index Value Index 0 Index 1 Index 2 Index 3 Index 4 Index 5 Index 6 Index 7 Index 8 subscriber name (java.lang.string) array of mappings (java.lang.string[]) array of mapping types (short[]) domain name (java.lang.string) array of property names (java.lang.string[]) array of property values (java.lang.string[]) array of custom property names (java.lang.string[]) array of custom property values (java.lang.string[]) autologout time, as seconds from now, or -1 if not set (long[]) The following is the list of error codes that this method might return: ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. 3-21

22 subscriberexists Chapter 3 Blocking API Example To retrieve the subscriber record of alpha: Object[] subrecord = getsubscriber("alpha"); String[] mappings = (String[])subRecord[1] short[] mappingtypes = {short[])subrecord[2]; String domainname = (String)subRecord[3]; String[] propertynames = (String[])subRecord[4]; String[] propertyvalues = (String[])subRecord[5]; String[] custompropertyname = (String[])subRecord[6]; String[] custompropertyvalues = (String[])subRecord[7]; long[] autologouttime = (long[])subrecord[8]; subscriberexists The following sections provide subscriberexists operation information:, page 3-22, page 3-22, page 3-22, page 3-22, page 3-22 The subscriberexists syntax: public boolean subscriberexists(string subscribername) Verifies that a subscriber exists in the SM database. subscribername See the explanation of subscriber name formatting in the Subscriber Name Format section on page 2-4. TRUE If the subscriber was found in the SM database. FALSE If the subscriber could not be found. None. 3-22

23 Chapter 3 Blocking API subscriberloggedin subscriberloggedin The following sections provide subscriberloggedin operation information:, page 3-23, page 3-23, page 3-23, page 3-23, page 3-23 The subscriberloggedin syntax: public boolean subscriberloggedin(string subscribername) Checks whether a subscriber that already exists in the SM database is logged in; in other words, if the subscriber also exists in an SCE database. When the SM is configured to work in Pull mode, a TRUE value returned by this method does not guarantee that the subscriber actually exists in an SCE database, but rather the subscriber is available to be pulled by an SCE if needed. If the subscriber does not exist in the SM database, an exception is thrown. subscribername See the explanation of subscriber name formatting in the Subscriber Name Format section on page 2-4. TRUE If the subscriber is logged in. FALSE If the subscriber is not logged in. The following is the list of error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. 3-23

24 getsubscribernamebymapping Chapter 3 Blocking API getsubscribernamebymapping The following sections provide getsubscribernamebymapping operation information:, page 3-24, page 3-24, page 3-24, page 3-24, page 3-25 The getsubscribernamebymapping syntax: public String getsubscribernamebymapping(string mapping, short mappingtype, String domain) Finds a subscriber name according to a mapping and a domain. mapping See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. mappingtype See the explanation of mappings and mapping types in the Information About Network ID Mappings section on page 2-4. domain Name of the domain to which the subscriber belongs. The operation fails if either of the following conditions exists: Domain is null, but the subscriber exists in the database and belongs to a domain. Specified domain is incorrect. Subscriber name If a subscriber record was found. NULL If no subscriber record could be found. 3-24

25 Chapter 3 Blocking API getsubscribernames (all) The following is the list of error codes that this method might return: ERROR_CODE_DOMAIN_NOT_FOUND ERROR_CODE _BAD_SUBSCRIBER_MAPPING ERROR_CODE_NOT_A_SUBSCRIBER_DOMAIN ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. getsubscribernames (all) The following sections provide information about the getsubscribernames (all) operation:, page 3-25, page 3-25, page 3-26, page 3-26, page 3-26 Example, page 3-26 The getsubscribernames (all) syntax: public String[] getsubscribernames(string lastbulkend, int numofsubscribers) Retrieves a bulk of subscriber names from the SM database, starting with lastbulkend followed by the next numofsubscribers subscribers (in alphabetical order). If lastbulkend is NULL, the first subscriber name (alphabetically) that exists in the SM database is used. Note There is no guarantee that the total number of subscribers (in all the bulks) will equal the value returned from getnumofsubscribers at any time. The values may differ if some subscribers are added or removed while the bulks are being retrieved. 3-25

26 getsubscribernames (all) Chapter 3 Blocking API lastbulkend The last subscriber name from the last bulk. Use NULL to start with the first (alphabetic) subscriber. numofsubscribers The limit on the number of subscribers that is returned. If this value is higher than the SM limit (1000), the SM limit is used. Note It is recommended that you do not provide a value of more than 500 subscribers. Example An array of subscriber names alphabetically ordered. The getsubscribernames (all) method returns as many subscribers as are found in the SM database, starting at the requested subscriber. The array size is limited by the smaller value between numofsubscribers and the SM limit (1000). The following are the error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. boolean hasmoresubscribers; String lastbulkend = null; int bulksize = 100; do { String[] subscribers = smapi.getsubscribernames(lastbulkend, bulksize); hasmoresubscribers = false; if (subscribers!= null) { for (int i = 0; i < subscribers.length; i++) { // do something with subscribers[i] } if (subscribers.length == bulksize) { hasmoresubscribers = true; lastbulkend = subscribers[bulksize - 1]; } } } while (hasmoresubscribers); 3-26

27 Chapter 3 Blocking API getsubscribernames (filter by property) getsubscribernames (filter by property) The following sections provide information about the getsubscribernames (filter by property) operation:, page 3-27, page 3-27, page 3-27, page 3-28, page 3-28 The getsubscribernames (filter by property) syntax: public String[] getsubscribernames(string lastbulkend,string propertyname,string propertyvalue,int numofsubscribers) Retrieves a bulk of subscriber names from the SM database, starting with lastbulkend followed by the next numofsubscribers subscribers (in alphabetical order), and based on the property name and property value. If lastbulkend is NULL, the first subscriber name (alphabetically) that exists in the SM database is used. Note There is no guarantee that the total number of subscribers (in all the bulks) will equal the value returned from getnumofsubscribers at any time. The values may differ if some subscribers are added or removed while the bulks are being retrieved. lastbulkend The last subscriber name from the last bulk. Use NULL to start with the first (alphabetic) subscriber. propertyname The property name of the string type used to filter subscriber names. propertyvalue The property value of the string type used to filter subscriber names. numofsubscribers The limit on number of subscribers that is returned. If this value is higher than the SM limit (1000), the SM limit is used. Note It is recommended that you do not provide a value of more than 500 subscribers. 3-27

28 getsubscribernamesindomain Chapter 3 Blocking API An array of alphabetically ordered subscriber names that matches the property name and its value provided. The method returns as many subscribers as are found in the SM database, starting at the requested subscriber. The array size is limited by the smaller value between numofsubscribers and the SM limit (1000). The following are the error codes that this method might return: ERROR_CODE_DATABASE_EXCEPTION ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME For a description of error codes, see Appendix A, List of Error Codes. getsubscribernamesindomain The following sections provide information about the getsubscribernamesindomain operation:, page 3-28, page 3-28, page 3-28, page 3-29, page 3-29 The getsubscribernamesindomain syntax: public String[] getsubscribernamesindomain(string lastbulkend, int numofsubscribers, String domain) Gets subscribers in the SM database that are associated with the specified domain. The semantics of this operation are the same as the semantics of the getsubscribernames operation described in the getsubscribernames (all) section on page lastbulkend See description in the section on page 3-26 of the getsusbcribernames operation. numofsubscribers See description in the section on page 3-26 of the getsusbcribernames operation. domain The name of a subscriber domain that exists in the SM domain repository. 3-28

29 Chapter 3 Blocking API getsubscribernameswithprefix An alphabetically ordered array of subscriber names that belong to the domain provided. See also the section on page 3-26 of the getsubscribernames operation. The following is the list of error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE _DOMAIN_NOT_FOUND ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. getsubscribernameswithprefix The following section provide getsubscribernameswithprefix operation information:, page 3-29, page 3-29, page 3-29, page 3-30, page 3-30 The getsubscribernameswithprefix syntax: public String[] getsubscribernameswithprefix(string lastbulkend, int numofsubscribers, String prefix) Gets subscribers in the SM database whose name begins with a specified prefix. The semantics of this operation are the same as the semantics of the getsubscribernames operation described in the getsubscribernames (all) section on page lastbulkend See the description in the section on page 3-26 of the getsusbcribernames operation. numofsubscribers See the description in the section on page 3-26 of the getsusbcribernames operation. prefix Case-sensitive string that marks the prefix of the required subscriber names. 3-29

30 getsubscribernameswithsuffix Chapter 3 Blocking API An alphabetically ordered array of subscriber names that start with the prefix required. See also the section on page 3-26 of the getsubscribernames operation. The following is the list of error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. getsubscribernameswithsuffix The following sections provide getsubscribernameswithsuffix operation information:, page 3-30, page 3-30, page 3-30, page 3-31, page 3-31 The getsubscribernameswithsuffix syntax: public String[] getsubscribernameswithsuffix(string lastbulkend, int numofsubscribers, String suffix) Gets subscribers in the SM database whose names end with the specified suffix. The semantics of this operation are the same as the semantics of the getsubscribernames operation described in the getsubscribernames (all) section on page lastbulkend See the description in the section on page 3-26 of the getsusbcribernames operation. numofsubscribers See the description in the section on page 3-26 of the getsusbcribernames operation. suffix Case-sensitive string that marks the suffix of the required subscriber names. 3-30

31 Chapter 3 Blocking API getdomains An alphabetically ordered array of subscriber names that end with the suffix required. See also the section on page 3-26 of the getsubscribernames operation. The following is the list of error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. getdomains The following sections provide getdomains operation information:, page 3-31, page 3-31, page 3-31, page 3-31 The getdomains syntax: public String[] getdomains() Provides the list of current subscriber domains in the SM domain repository. A complete list of subscriber domain names in the SM. None. 3-31

32 setpropertiestodefault Chapter 3 Blocking API setpropertiestodefault The followining sections provide setpropertiestodefault operation information:, page 3-32, page 3-32, page 3-32, page 3-32, page 3-32 The setpropertiestodefault syntax: public void setpropertiestodefault(string subscribername, String[] properties) Resets the specified application properties of a subscriber. If an application is installed, the relevant application properties is set to the default value of the properties according to the currently loaded application information. If an application is not installed, a java.lang.illegalstateexception is returned. subscribername See the explanation of subscriber name formatting in the Subscriber Name Format section on page 2-4. properties See the explanation of property keys and values in the Subscriber Properties section on page 2-7. None. The following is the list of error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE _BAD_SUBSCRIBER_MAPPING ERROR_CODE_DOMAIN_NOT_FOUND ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE_NOT_A_SUBSCRIBER_DOMAIN ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. 3-32

33 Chapter 3 Blocking API removecustomproperties removecustomproperties The following section provide removecustomproperties operation information:, page 3-33, page 3-33, page 3-33, page 3-33, page 3-33 The removecustomproperties syntax: public void removecustomproperties(string subscribername, String[] customproperties) Resets the specified custom properties of a subscriber. subscribername See the explanation of subscriber name formatting in the Subscriber Name Format section on page 2-4. CustomProperties See the explanation of custom property keys and values in the Custom Properties section on page 2-7. None. The following is the list of error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE_DATABASE_EXCEPTION For a description of error codes, see Appendix A, List of Error Codes. 3-33

34 Information About QM Blocking API Methods Chapter 3 Blocking API Information About QM Blocking API Methods This section lists the methods of the QM Blocking API. The syntax of each method is followed by a description of each method s input parameters and return values. For static or manual subscriber quota configuration, the following methods are relevant: addsubscriberquota, page 3-34 setsubscriberquota, page 3-35 replenishsubscriberquota, page 3-36 For simple read-only operations, the following methods are relevant: getsubscriberquotainformation, page 3-37 getsubscriberquotaprofileid, page 3-38 getbreachedsubscribernames, page 3-39 getpenaltysubscribernames, page 3-40 addsubscriberquota The following sections provide information about the addsubscriberquota operation:, page 3-34, page 3-34, page 3-34, page 3-35 The addsubscriberquota syntax: public void addsubscriberquota(string subscribername,int bucketid,long bucketsize) The addsubscriberquota method adds the quota for the given bucket ID of a subscriber. subscribername See the explanation for the subscriber name format in the Subscriber Name Format section on page 2-4. bucketid An integer value of the bucket ID to add. bucketsize A long value of the bucket size to add. 3-34

35 Chapter 3 Blocking API setsubscriberquota The following are the error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE _DATABASE_EXCEPTION ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE_NO_QUOTA_INFO_FOR_SUBSCRIBER ERROR_CODE_INVALID_BUCKETID ERROR_CODE_INVALID_BUCKETSIZE setsubscriberquota The following sections provide information about the setsubscriberquota operation:, page 3-35, page 3-35, page 3-35, page 3-36 The setsubscriberquota syntax: public void setsubscriberquota(string subscribername,int bucketid,long bucketsize) The setsubscriberquota method updates the quota for the given bucket ID of a subscriber. subscribername See the explanation for the subscriber name format in the Subscriber Name Format section on page 2-4. bucketid An integer value of the bucket ID to update. bucketsize A long value of the bucket size to update. 3-35

36 replenishsubscriberquota Chapter 3 Blocking API The following are the error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE _DATABASE_EXCEPTION ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE_NO_QUOTA_INFO_FOR_SUBSCRIBER ERROR_CODE_INVALID_BUCKETID ERROR_CODE_INVALID_BUCKETSIZE replenishsubscriberquota The following sections provide information about the replenishsubscriberquota operation:, page 3-36, page 3-36, page 3-36, page 3-36 The replenishsubscriberquota syntax: public void replenishsubscriberquota(string subscribername) The replenishsubscriberquota method replenishes the quota for the given subscriber. subscribername See the explanation for the subscriber name format in the Subscriber Name Format section on page 2-4. The following are the error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE _DATABASE_EXCEPTION ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE_NO_QUOTA_INFO_FOR_SUBSCRIBER ERROR_REPLENISH_FAILED 3-36

37 Chapter 3 Blocking API getsubscriberquotainformation getsubscriberquotainformation The following sections provide information about the getsubscriberquotainformation operation:, page 3-37, page 3-37, page 3-37, page 3-37, page 3-38 The getsubscriberquotainformation syntax: public Object[] getsubscriberquotainformation(string subscribername) Get a bulk of quota information for a specified subscriber. subscribername See the explanation for the subscriber name format in the Subscriber Name Format section on page 2-4. An object array with five elements. Table 3-2 lists the index values and descriptions. No array element is NULL. Table 3-2 Indexes and s Index Value Index 0 Index 1 Index 2 package ID (java.lang.string) last replenish time (java.lang.string) last SCE that consumed quota (java.lang.string) 3-37

38 getsubscriberquotaprofileid Chapter 3 Blocking API Table 3-2 Index Value Index 3 Index 4 Indexes and s (continued) aggregation period end (java.lang.string) quota buckets (java.lang.object[][]) Bucket 1: [0][0]=500 (quota size) [0][1]=500 (remaining quota) [0][2]=50 (last quota reported by SCE) [0][3]=time not set (penalty start) [0][4]=time not set (next penalty monitor) Bucket 2: [1][0]=500 (quota size) [1][1]=500 (remaining quota) [1][2]=50 (last quota reported by SCE) [1][3]=time not set (penalty start) [1][4]=time not set (next penalty monitor) The following are the error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE _DATABASE_EXCEPTION ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE_NO_QUOTA_INFO_FOR_SUBSCRIBER getsubscriberquotaprofileid The following sections provide information about the getsubscriberquotaprofileid operation:, page 3-38, page 3-39, page 3-39, page 3-39, page 3-39 The getsubscriberquotaprofileid syntax: public int getsubscriberquotaprofileid(string subscribername) 3-38

39 Chapter 3 Blocking API getbreachedsubscribernames The getsubscriberquotaprofileid method returns the quota profile ID for the specified subscriber. subscribername See the explanation for the subscriber name format in the Subscriber Name Format section on page 2-4. Quota profile ID. The following are the error codes that this method might return: ERROR_CODE_ILLEGAL_SUBSCRIBER_NAME ERROR_CODE _DATABASE_EXCEPTION ERROR_CODE_SUBSCRIBER_DOES_NOT_EXIST ERROR_CODE_SUBSCRIBER_NOT_ASSIGNED_PROFILE getbreachedsubscribernames The following sections provide information about the getbreachedsubscribernames operation:, page 3-39, page 3-39, page 3-40, page 3-40, page 3-40 The getbreachedsubscribernames syntax: public String[] getbreachedsubscribernames(string lastbulkend,int numofsubscribers) The getbreachedsubscribernames method retrieves the breached subscriber names. 3-39

40 getpenaltysubscribernames Chapter 3 Blocking API lastbulkend The last subscriber name from the last bulk. Use NULL to start with the first (alphabetic) subscriber. numofsubscribers The limit on number of subscribers that will be returned. If this value is higher than the SM limit (1000), then the SM limit is used. An array of alphabetically ordered subscriber names that belong to a breached state. This method returns all the subscribers found in the SM database starting with the requested subscriber. The array size is limited by the smaller value between numofsubscribers and the SM limit (1000). The getbreachedsubscribernames method might return an ERROR_CODE _DATABASE_EXCEPTION error code. getpenaltysubscribernames The following sections provide information about the getpenaltysubscribernames operation:, page 3-40, page 3-40, page 3-40, page 3-41, page 3-41 The getpenaltysubscribernames syntax: public String[] getpenaltysubscribernames(string lastbulkend,int numofsubscribers) The getpenaltysubscribernames method retrieves the subscriber names in a penalty state. lastbulkend The last subscriber name from the last bulk. Use NULL to start with the first (alphabetic) subscriber. numofsubscribers The limit on number of subscribers that will be returned. If this value is higher than the SM limit (1000), then the SM limit is used. 3-40

41 Chapter 3 Blocking API Blocking API Code Examples An array of alphabetically ordered subscriber names that belong to a penalty state. This method returns all the subscribers found in the SM database starting with the requested subscriber. The array size is limited by the smaller value between numofsubscribers and the SM limit (1000). The getpenaltysubscribernames method might return an ERROR_CODE _DATABASE_EXCEPTION error code. Blocking API Code Examples This section contains three code examples: Getting Number of Subscribers, page 3-41 Adding a Subscriber, Printing Information, and Removing a Subscriber, page 3-42 Getting Subscriber Quota Information, page 3-43 Getting Number of Subscribers The following example prints to stdout the total number of subscribers in the SM database and the number of subscribers in each subscriber domain: package blocking; import com.pcube.management.api.smblockingapi; public class PrintInfo { public static void main (String args[]) throws Exception { SMBlockingApi bapi = new SMBlockingApi(); try { //initiation bapi.setreplytimeout(300000); //set timeout for 5 minutes bapi.connect(args[0]); // connect to the SM } } //operations String[] domains=bapi.getdomains(); int totalsubscribers=bapi.getnumberofsubscribers(); System.out.println( "number of susbcribers in the database:\t\t "+ totalsubscribers); for (int i=0; i<domains.length; i++) { int numberofsusbcribersindomain= bapi.getnumberofsubscribersindomain(domains[i]); System.out.println( "number of susbcribers domain "+domains[i]+ ":\t\t "+numberofsusbcribersindomain); } } finally { //finalization bapi.disconnect(); } 3-41

42 Adding a Subscriber, Printing Information, and Removing a Subscriber Chapter 3 Blocking API Adding a Subscriber, Printing Information, and Removing a Subscriber The following program adds a subscriber to the subscriber database, then gets its information and prints it to stdout, and finally removes the subscriber from the subscriber database: package blocking; import com.pcube.management.api.smblockingapi; import com.pcube.management.api.smapiconstants; public class AddPrintRemove { public static void main (String args[]) throws Exception { checkarguments(args); SMBlockingApi bapi = new SMBlockingApi(); try { //initiation bapi.setreplytimeout(10000); //set timeout for 10 seconds bapi.connect(args[0]); // connect to the SM //add subscriber System.out.println("+ adding subscriber to SM"); bapi.addsubscriber( args[1], //name new String[]{args[2]}, //mapping SMApiConstants.ALL_IP_MAPPINGS, new String[]{args[3]}, //property key new String[]{args[4]}, //property value new String[]{"custom-key"}, //custom property key new String[]{"10"}, //custom property value args[5]); //domain //Print subscriber System.out.println("+ Printing subscriber"); Object[] subfields = bapi.getsubscriber(args[1]); System.out.println("\tname:\t\t"+subfields[0]); System.out.println("\tmapping:\t"+ ((String[])subfields[1])[0]); System.out.println("\tdomain:\t\t"+subfields[3]); System.out.println("\tautologout:\t"+subfields[8]); //Remove subscriber System.out.println("+ removing subscriber from SM"); bapi.removesubscriber(args[1]); } finally { //finalization bapi.disconnect(); } } } static void checkarguments(string[] args) throws Exception{ if (args.length!= 6) { System.err.println( "usage: java AddPrintRemove <SM-address>"+ " <subscriber-name> <IP mapping> <property-key>"+ " <property-value> <domain>"); System.exit(1); } } 3-42

If you only need to develop an automatic integration Nonblocking API module.

If you only need to develop an automatic integration Nonblocking API module. CHAPTER 3 This module introduces the Reply Timeout, a feature unique to the. The rest of the module lists all operations of the, and provides code examples. Note If you only need to develop an automatic

More information

Cisco Service Control Management Suite Subscriber Manager Java API Programmer Guide

Cisco Service Control Management Suite Subscriber Manager Java API Programmer Guide Cisco Service Control Management Suite Subscriber Manager Java API Programmer Guide Release 3.6.x November 8, 2010 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706

More information

Nonblocking API. Introduction. Information About Reliability Support. Reliable Mode CHAPTER

Nonblocking API. Introduction. Information About Reliability Support. Reliable Mode CHAPTER CHAPTER 4 Nonblocking API Revised: November 8, 2010, Introduction This chapter introduces features unique to the Nonblocking Application Programming Interface (API). It lists all methods of the Nonblocking

More information

Nonblocking API. Introduction CHAPTER

Nonblocking API. Introduction CHAPTER CHAPTER 4 Nonblocking API Revised: September 20, 2011, Introduction This chapter introduces features unique to the Nonblocking API. It presents all Nonblocking API methods and provides code examples for

More information

Cisco Service Control Subscriber Manager Java API Programmer Guide

Cisco Service Control Subscriber Manager Java API Programmer Guide Cisco Service Control Subscriber Manager Java API Programmer Guide Release 4.1.x December 23, 2013 Cisco Systems, Inc. www.cisco.com Cisco has more than 200 offices worldwide. Addresses, phone numbers,

More information

Cisco Service Control Subscriber Manager Java API Programmer Guide

Cisco Service Control Subscriber Manager Java API Programmer Guide Cisco Service Control Subscriber Manager Java API Programmer Guide Release 3.8.x December 21, 2012 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com

More information

Cisco SCMS SM Java API Programmer Guide

Cisco SCMS SM Java API Programmer Guide Cisco SCMS SM Java API Programmer Guide Release 3.5.5 July 23, 2009 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800

More information

Programming with the Service Control Engine Subscriber Application Programming Interface

Programming with the Service Control Engine Subscriber Application Programming Interface CHAPTER 5 Programming with the Service Control Engine Subscriber Application Programming Interface Revised: November 20, 2012, Introduction This chapter provides a detailed description of the Application

More information

Programming with the Service Control Engine Subscriber Application Programming Interface

Programming with the Service Control Engine Subscriber Application Programming Interface CHAPTER 5 Programming with the Service Control Engine Subscriber Application Programming Interface Revised: July 28, 2009, Introduction This chapter provides a detailed description of the Application Programming

More information

General API Concepts. Introduction CHAPTER

General API Concepts. Introduction CHAPTER CHAPTER 2 General API Concepts Revised: September 20, 2011, Introduction This chapter describes the various concepts that are used when working with the Subscriber Manager (SM) C/C++ API. Blocking API

More information

Cisco SCMS SM C/C++ API Programmer Guide

Cisco SCMS SM C/C++ API Programmer Guide Cisco SCMS SM C/C++ API Programmer Guide Release 3.1.6 May 2008 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800 553-NETS

More information

Cisco SCMS SM C/C++ API Programmer Guide

Cisco SCMS SM C/C++ API Programmer Guide Cisco SCMS SM C/C++ API Programmer Guide Release 3.5.5 July 22, 2009 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800

More information

Getting Familiar with the Application Programming Interface Data Types

Getting Familiar with the Application Programming Interface Data Types CHAPTER 4 Getting Familiar with the Application Programming Interface Data Types Revised: November 8, 2010, Introduction This chapter describes the various API data types used in the Service Control Management

More information

Getting Familiar with the API Data Types

Getting Familiar with the API Data Types CHAPTER 4 This module describes the various API data types used in the SCMS SCE Subscriber API. Subscriber ID, page 4-1 Information About Network ID Mappings, page 4-2 Information About SCA BB Subscriber

More information

Nonblocking API. Introduction. Multithreading Support CHAPTER

Nonblocking API. Introduction. Multithreading Support CHAPTER CHAPTER 4 Nonblocking API Revised: November 8, 2010, Introduction This chapter describes the features and operations of the Nonblocking API and provides code examples. This chapter introduces the Result

More information

Nonblocking API. Introduction. Multithreading Support CHAPTER

Nonblocking API. Introduction. Multithreading Support CHAPTER CHAPTER 4 Nonblocking API Revised: September 20, 2011, Introduction This chapter describes the features and operations of the Nonblocking API and provides code examples. It also introduces the result handler

More information

About the Internet Protocol Detail Record (IPDR) Login Event Generator

About the Internet Protocol Detail Record (IPDR) Login Event Generator CHAPTER 32 About the Internet Protocol Detail Record (IPDR) Login Event Generator Revised: August 02, 2012, Introduction This chapter describes the Internet Protocol Detail Record (IPDR) Login Event Generator

More information

Nonblocking API. Introduction. Multithreading Support CHAPTER

Nonblocking API. Introduction. Multithreading Support CHAPTER CHAPTER 4 Revised: July 22, 2009, Introduction This chapter describes the features and operations of the and provides code examples. This chapter introduces the Result Handler Callbacks, a feature unique

More information

About the DHCP Lease Query Login Event Generator

About the DHCP Lease Query Login Event Generator CHAPTER 7 About the DHCP Lease Query Login Event Generator Revised: March 22, 2012, Introduction This chapter describes the Service Control Management Suite (SCMS) Subscriber Manager (SM) DHCP Lease Query

More information

/* operation failure callback specification */ typedef void (*OperationFailCallBackFunc)(Uint32 arghandle, ReturnCode *argreturncode);

/* operation failure callback specification */ typedef void (*OperationFailCallBackFunc)(Uint32 arghandle, ReturnCode *argreturncode); CHAPTER 4 Nonblocking API Published: May 27, 2013 Introduction This chapter describes the features and operations of the Nonblocking API and provides code examples. It also introduces the result handler

More information

Quota Management Overview

Quota Management Overview CHAPTER 1 Quota Management Overview Published: May 27, 2013, Introduction This chapter provides an overview of the Quota Manager. The chapter contains the following sections: Information About the Quota

More information

Configuration and Management

Configuration and Management CHAPTER 4 This module describes how to configure and manage the SM. Information About SM Methods, page 4-1 How to Configure a Subscriber Management Solution, page 4-3 How to Use the CLU, page 4-13 Information

More information

Managing Subscribers

Managing Subscribers CHAPTER 9 The SCE platform is subscriber aware, that is, it can relate traffic and usage to specific customers. This ability to map between IP flows and a specific subscriber allows the system to do the

More information

Programming with the SCA BB Service Configuration API

Programming with the SCA BB Service Configuration API CHAPTER 3 Programming with the SCA BB Service Configuration API Revised: November 8, 2010, Introduction This chapter is a reference for the main classes and methods of the Cisco SCA BB Service Configuration

More information

Operators and Expressions

Operators and Expressions Operators and Expressions Conversions. Widening and Narrowing Primitive Conversions Widening and Narrowing Reference Conversions Conversions up the type hierarchy are called widening reference conversions

More information

Getting started with Java

Getting started with Java Getting started with Java Magic Lines public class MagicLines { public static void main(string[] args) { } } Comments Comments are lines in your code that get ignored during execution. Good for leaving

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

License Line Management Functions

License Line Management Functions CHAPTER 8 License Line Management Functions This chapter provides information about the following license line management functions: asyncannotatelicenselines, page 8-1 asyncdeploylicenselines, page 8-3

More information

CS159. Nathan Sprague

CS159. Nathan Sprague CS159 Nathan Sprague What s wrong with the following code? 1 /* ************************************************** 2 * Return the mean, or -1 if the array has length 0. 3 ***************************************************

More information

Assertions, pre/postconditions

Assertions, pre/postconditions Programming as a contract Assertions, pre/postconditions Assertions: Section 4.2 in Savitch (p. 239) Specifying what each method does q Specify it in a comment before method's header Precondition q What

More information

Info 408 Distributed Applications Programming Exercise sheet nb. 4

Info 408 Distributed Applications Programming Exercise sheet nb. 4 Lebanese University Info 408 Faculty of Science 2017-2018 Section I 1 Custom Connections Info 408 Distributed Applications Programming Exercise sheet nb. 4 When accessing a server represented by an RMI

More information

public static boolean isoutside(int min, int max, int value)

public static boolean isoutside(int min, int max, int value) See the 2 APIs attached at the end of this worksheet. 1. Methods: Javadoc Complete the Javadoc comments for the following two methods from the API: (a) / @param @param @param @return @pre. / public static

More information

Programming with the SCA BB Service Configuration API

Programming with the SCA BB Service Configuration API CHAPTER 3 Programming with the SCA BB Service Configuration API Revised: September 17, 2012, Introduction This chapter is a reference for the main classes and methods of the Cisco SCA BB Service Configuration

More information

License Inventory Management Functions

License Inventory Management Functions CHAPTER 7 This chapter provides information about the following license inventory management functions: asyncannotatelicenses, page 7-1 asyncdeploylicenses, page 7-3 asyncobtainlicense, page 7-4 getdeviceidswithundeployedlicenses,

More information

Troubleshooting the Remote Cable MSO Links Solution

Troubleshooting the Remote Cable MSO Links Solution 6 CHAPTER Troubleshooting the Remote Cable MSO Links Solution Published: June 21, 2013, Introduction This chapter describes several problem scenarios that you may encounter when using the solution The

More information

KIP-266: Fix consumer indefinite blocking behavior

KIP-266: Fix consumer indefinite blocking behavior KIP-266: Fix consumer indefinite blocking behavior Status Motivation Public Interfaces Consumer#position Consumer#committed and Consumer#commitSync Consumer#poll Consumer#partitionsFor Consumer#listTopics

More information

Array. Prepared By - Rifat Shahriyar

Array. Prepared By - Rifat Shahriyar Java More Details Array 2 Arrays A group of variables containing values that all have the same type Arrays are fixed length entities In Java, arrays are objects, so they are considered reference types

More information

PROGRAMMING FUNDAMENTALS

PROGRAMMING FUNDAMENTALS PROGRAMMING FUNDAMENTALS Q1. Name any two Object Oriented Programming languages? Q2. Why is java called a platform independent language? Q3. Elaborate the java Compilation process. Q4. Why do we write

More information

BIT Java Programming. Sem 1 Session 2011/12. Chapter 2 JAVA. basic

BIT Java Programming. Sem 1 Session 2011/12. Chapter 2 JAVA. basic BIT 3383 Java Programming Sem 1 Session 2011/12 Chapter 2 JAVA basic Objective: After this lesson, you should be able to: declare, initialize and use variables according to Java programming language guidelines

More information

Configuration and Management

Configuration and Management CHAPTER 5 Revised: February 2, 2011, Introduction This module describes how to configure and manage the Subscriber Manager. Information About Subscriber Manager Methods, page 5-1 How to Configure a Subscriber

More information

CS2141 Software Development using C/C++ C++ Basics

CS2141 Software Development using C/C++ C++ Basics CS2141 Software Development using C/C++ C++ Basics Integers Basic Types Can be short, long, or just plain int C++ does not define the size of them other than short

More information

Programming. Syntax and Semantics

Programming. Syntax and Semantics Programming For the next ten weeks you will learn basic programming principles There is much more to programming than knowing a programming language When programming you need to use a tool, in this case

More information

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide AP Computer Science Chapter 10 Implementing and Using Classes Study Guide 1. A class that uses a given class X is called a client of X. 2. Private features of a class can be directly accessed only within

More information

Programming with the SCA BB Service Configuration API

Programming with the SCA BB Service Configuration API CHAPTER 3 Programming with the SCA BB Service Configuration API Published: December 23, 2013, Introduction This chapter is a reference for the main classes and methods of the Cisco SCA BB Service Configuration

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a

More information

Configuring the RADIUS Listener Login Event Generator

Configuring the RADIUS Listener Login Event Generator CHAPTER 19 Configuring the RADIUS Listener Login Event Generator Published: December 21, 2012 Introduction This chapter describes the configuration procedure for the RADIUS listener Login Event Generator

More information

Configuring the Cisco IOS DHCP Server

Configuring the Cisco IOS DHCP Server Cisco devices running Cisco software include Dynamic Host Configuration Protocol (DHCP) server and the relay agent software. The Cisco IOS DHCP server is a full DHCP server implementation that assigns

More information

License Line Management Functions

License Line Management Functions CHAPTER 8 This chapter provides information about the following license line management functions: asyncannotatelicenselines, page 8-1 asyncdeploylicenselines, page 8-3 getlicenselinesbylicense, page 8-4

More information

Chapter 4 Defining Classes I

Chapter 4 Defining Classes I Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the

More information

CS/B.TECH/CSE(New)/SEM-5/CS-504D/ OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 GROUP A. (Multiple Choice Type Question)

CS/B.TECH/CSE(New)/SEM-5/CS-504D/ OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 GROUP A. (Multiple Choice Type Question) CS/B.TECH/CSE(New)/SEM-5/CS-504D/2013-14 2013 OBJECT ORIENTED PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give their answers

More information

B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA

B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE

More information

PASSWORD RBL API GUIDE API VERSION 2.10 REVISION B

PASSWORD RBL API GUIDE API VERSION 2.10 REVISION B PASSWORD RBL API GUIDE API VERSION 2.10 REVISION B Table of Contents Summary... 3 Recommendations... 3 API Endpoints... 3 Method: Query... 4 GET request syntax... 4 Parameter Listing... 4 Required Parameters...

More information

Raw Data Records: Formats and Field Contents

Raw Data Records: Formats and Field Contents CHAPTER 2 This chapter contains a list of the Raw Data Records (RDRs) produced by the SCE platform and a full description of the fields contained in each RDR. The chapter also contains field-content information

More information

MIP4 Working Group. Generic Notification Message for Mobile IPv4 draft-ietf-mip4-generic-notification-message-16

MIP4 Working Group. Generic Notification Message for Mobile IPv4 draft-ietf-mip4-generic-notification-message-16 MIP4 Working Group Internet-Draft Intended status: Standards Track Expires: April 28, 2011 H. Deng China Mobile H. Levkowetz Netnod V. Devarapalli WiChorus S. Gundavelli Cisco Systems B. Haley Hewlett-Packard

More information

CONTENTS: Array Usage Multi-Dimensional Arrays Reference Types. COMP-202 Unit 6: Arrays

CONTENTS: Array Usage Multi-Dimensional Arrays Reference Types. COMP-202 Unit 6: Arrays CONTENTS: Array Usage Multi-Dimensional Arrays Reference Types COMP-202 Unit 6: Arrays Introduction (1) Suppose you want to write a program that asks the user to enter the numeric final grades of 350 COMP-202

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2010 Handout Decaf Language Tuesday, Feb 2 The project for the course is to write a compiler

More information

Configuring DHCP Features and IP Source Guard

Configuring DHCP Features and IP Source Guard CHAPTER 23 This chapter describes how to configure DHCP snooping and option-82 data insertion, and the DHCP server port-based address allocation features on the IE 3000 switch. It also describes how to

More information

ARADIAL TECHNOLOGIES Aradial Enforcer Manual Version 7.0

ARADIAL TECHNOLOGIES Aradial Enforcer Manual Version 7.0 ARADIAL TECHNOLOGIES Aradial Enforcer Manual Version 7.0 Administration Guide A R A D I A L E N F O R C E R Administration Guide Aradial Technologies Ltd. Information in this document is subject to change

More information

SCE- Subscriber API. SM-API Adapter. Adapter. Diameter Stack

SCE- Subscriber API. SM-API Adapter. Adapter. Diameter Stack CHAPTER 4 Revised: October 25, 2011, Introduction The Gy interface is used for reporting and charging. In SCA BB, support of the Gy interface is divided into two components. The two components reside on

More information

In Java, data type boolean is used to represent Boolean data. Each boolean constant or variable can contain one of two values: true or false.

In Java, data type boolean is used to represent Boolean data. Each boolean constant or variable can contain one of two values: true or false. CS101, Mock Boolean Conditions, If-Then Boolean Expressions and Conditions The physical order of a program is the order in which the statements are listed. The logical order of a program is the order in

More information

Exception Handling. Run-time Errors. Methods Failure. Sometimes when the computer tries to execute a statement something goes wrong:

Exception Handling. Run-time Errors. Methods Failure. Sometimes when the computer tries to execute a statement something goes wrong: Exception Handling Run-time errors The exception concept Throwing exceptions Handling exceptions Declaring exceptions Creating your own exception 22 November 2007 Ariel Shamir 1 Run-time Errors Sometimes

More information

Operators. Java operators are classified into three categories:

Operators. Java operators are classified into three categories: Operators Operators are symbols that perform arithmetic and logical operations on operands and provide a meaningful result. Operands are data values (variables or constants) which are involved in operations.

More information

Crash Course in Java. Why Java? Java notes for C++ programmers. Network Programming in Java is very different than in C/C++

Crash Course in Java. Why Java? Java notes for C++ programmers. Network Programming in Java is very different than in C/C++ Crash Course in Java Netprog: Java Intro 1 Why Java? Network Programming in Java is very different than in C/C++ much more language support error handling no pointers! (garbage collection) Threads are

More information

Selected Questions from by Nageshwara Rao

Selected Questions from  by Nageshwara Rao Selected Questions from http://way2java.com by Nageshwara Rao Swaminathan J Amrita University swaminathanj@am.amrita.edu November 24, 2016 Swaminathan J (Amrita University) way2java.com (Nageshwara Rao)

More information

DHCP Overview. Introduction to DHCP

DHCP Overview. Introduction to DHCP Table of Contents DHCP Overview 1 Introduction to DHCP 1 DHCP Address Allocation 2 Allocation Mechanisms 2 Dynamic IP Address Allocation Process 2 IP Address Lease Extension 3 DHCP Message Format 3 DHCP

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

A Third Look At Java. Chapter Seventeen Modern Programming Languages, 2nd ed. 1

A Third Look At Java. Chapter Seventeen Modern Programming Languages, 2nd ed. 1 A Third Look At Java Chapter Seventeen Modern Programming Languages, 2nd ed. 1 A Little Demo public class Test { public static void main(string[] args) { int i = Integer.parseInt(args[0]); int j = Integer.parseInt(args[1]);

More information

School of Informatics, University of Edinburgh

School of Informatics, University of Edinburgh CS1Bh Solution Sheet 4 Software Engineering in Java This is a solution set for CS1Bh Question Sheet 4. You should only consult these solutions after attempting the exercises. Notice that the solutions

More information

Ad Hoc Conferencing. Ad Hoc Conferencing Overview. Ad Hoc Conferencing Task Flow. Procedure

Ad Hoc Conferencing. Ad Hoc Conferencing Overview. Ad Hoc Conferencing Task Flow. Procedure Overview, page 1 Task Flow, page 1 Conference Interactions and Restrictions, page 10 Overview Ad Hoc conferences allow the conference controller (or in some cases, another participant) to add participants

More information

ECE 122. Engineering Problem Solving with Java

ECE 122. Engineering Problem Solving with Java ECE 122 Engineering Problem Solving with Java Lecture 8 More Conditional Statements Outline Problem: How do I make choices in my Java program? Understanding conditional statements Remember: Boolean logic

More information

ECE 122. Engineering Problem Solving with Java

ECE 122. Engineering Problem Solving with Java ECE 122 Engineering Problem Solving with Java Lecture 8 More Conditional Statements Outline Problem: How do I make choices in my Java program? Understanding conditional statements Remember: Boolean logic

More information

Introduction to Java. Nihar Ranjan Roy. https://sites.google.com/site/niharranjanroy/

Introduction to Java. Nihar Ranjan Roy. https://sites.google.com/site/niharranjanroy/ Introduction to Java https://sites.google.com/site/niharranjanroy/ 1 The Java Programming Language According to sun Microsystems java is a 1. Simple 2. Object Oriented 3. Distributed 4. Multithreaded 5.

More information

Object Explorer. Atacama Large Millimeter Array

Object Explorer. Atacama Large Millimeter Array Atacama Large Millimeter Array KGB DOC 01/09 Revision: 1.7 2006 11 07 User s manual Mihael Kadunc Object Explorer User s manual Mihael Kadunc Josef Stefan Institute, Ljubljana Gašper Tkačik Josef Stefan

More information

Conditionals and Loops

Conditionals and Loops Conditionals and Loops Conditionals and Loops Now we will examine programming statements that allow us to: make decisions repeat processing steps in a loop Chapter 5 focuses on: boolean expressions conditional

More information

Algorithms and Programming I. Lecture#12 Spring 2015

Algorithms and Programming I. Lecture#12 Spring 2015 Algorithms and Programming I Lecture#12 Spring 2015 Think Python How to Think Like a Computer Scientist By :Allen Downey Installing Python Follow the instructions on installing Python and IDLE on your

More information

CS 6353 Compiler Construction Project Assignments

CS 6353 Compiler Construction Project Assignments CS 6353 Compiler Construction Project Assignments In this project, you need to implement a compiler for a language defined in this handout. The programming language you need to use is C or C++ (and the

More information

CHAPTER 44. Java Stored Procedures

CHAPTER 44. Java Stored Procedures CHAPTER 44 Java Stored Procedures 752 Oracle Database 12c: The Complete Reference You can write stored procedures, triggers, object type methods, and functions that call Java classes. In this chapter,

More information

Internet & World Wide Web How to Program, 5/e by Pearson Education, Inc. All Rights Reserved.

Internet & World Wide Web How to Program, 5/e by Pearson Education, Inc. All Rights Reserved. Internet & World Wide Web How to Program, 5/e Sequential execution Execute statements in the order they appear in the code Transfer of control Changing the order in which statements execute All scripts

More information

Cisco Service Control Quota Manager User Guide

Cisco Service Control Quota Manager User Guide Cisco Service Control Quota Manager User Guide Release 4.0.x November 28, 2013 Cisco Systems, Inc. www.cisco.com Cisco has more than 200 offices worldwide. Addresses, phone numbers, and fax numbers are

More information

CS2: Debugging in Java

CS2: Debugging in Java CS2: Debugging in Java 1. General Advice Jon Cook (LFCS) April 2003 Debugging is not always easy. Some bugs can take a long time to find. Debugging concurrent code can be particularly difficult and time

More information

General Syntax. Operators. Variables. Arithmetic. Comparison. Assignment. Boolean. Types. Syntax int i; float j = 1.35; int k = (int) j;

General Syntax. Operators. Variables. Arithmetic. Comparison. Assignment. Boolean. Types. Syntax int i; float j = 1.35; int k = (int) j; General Syntax Statements are the basic building block of any C program. They can assign a value to a variable, or make a comparison, or make a function call. They must be terminated by a semicolon. Every

More information

1 Shyam sir JAVA Notes

1 Shyam sir JAVA Notes 1 Shyam sir JAVA Notes 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write

More information

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find CS1622 Lecture 15 Semantic Analysis CS 1622 Lecture 15 1 Semantic Analysis How to build symbol tables How to use them to find multiply-declared and undeclared variables. How to perform type checking CS

More information

Version 8.0 PREEMPTIVE SOLUTIONS DASHO. User Guide

Version 8.0 PREEMPTIVE SOLUTIONS DASHO. User Guide Version 8.0 PREEMPTIVE SOLUTIONS DASHO User Guide 1998-2016 by PreEmptive Solutions, LLC All rights reserved. Manual Version 8.0-preview www.preemptive.com TRADEMARKS DashO, Overload-Induction, the PreEmptive

More information

Getting Started in Java. Bill Pugh Dept. of Computer Science Univ. of Maryland, College Park

Getting Started in Java. Bill Pugh Dept. of Computer Science Univ. of Maryland, College Park Getting Started in Java Bill Pugh Dept. of Computer Science Univ. of Maryland, College Park Hello, World In HelloWorld.java public class HelloWorld { public static void main(string [] args) { System.out.println(

More information

x = 3 * y + 1; // x becomes 3 * y + 1 a = b = 0; // multiple assignment: a and b both get the value 0

x = 3 * y + 1; // x becomes 3 * y + 1 a = b = 0; // multiple assignment: a and b both get the value 0 6 Statements 43 6 Statements The statements of C# do not differ very much from those of other programming languages. In addition to assignments and method calls there are various sorts of selections and

More information

All Rights Reserved, Copyright FUJITSU LIMITED IoT Platform Service Portal Operating Manual (Version 5_0.0)

All Rights Reserved, Copyright FUJITSU LIMITED IoT Platform Service Portal Operating Manual (Version 5_0.0) 1 IoT Platform Service Portal Operating Manual (Version 5_0.0) Version No. Description Date Version 1.0 First version 2016/10/07 Version 1.1 Error corrections and supporting launch of

More information

CS18000: Problem Solving And Object-Oriented Programming

CS18000: Problem Solving And Object-Oriented Programming CS18000: Problem Solving And Object-Oriented Programming Class (and Program) Structure 31 January 2011 Prof. Chris Clifton Classes and Objects Set of real or virtual objects Represent Template in Java

More information

Java Language Basics: Introduction To Java, Basic Features, Java Virtual Machine Concepts, Primitive Data Type And Variables, Java Operators,

Java Language Basics: Introduction To Java, Basic Features, Java Virtual Machine Concepts, Primitive Data Type And Variables, Java Operators, Java Language Basics: Introduction To Java, Basic Features, Java Virtual Machine Concepts, Primitive Data Type And Variables, Java Operators, Expressions, Statements and Arrays. Java technology is: A programming

More information

COMP 213. Advanced Object-oriented Programming. Lecture 17. Exceptions

COMP 213. Advanced Object-oriented Programming. Lecture 17. Exceptions COMP 213 Advanced Object-oriented Programming Lecture 17 Exceptions Errors Writing programs is not trivial. Most (large) programs that are written contain errors: in some way, the program doesn t do what

More information

Program Fundamentals

Program Fundamentals Program Fundamentals /* HelloWorld.java * The classic Hello, world! program */ class HelloWorld { public static void main (String[ ] args) { System.out.println( Hello, world! ); } } /* HelloWorld.java

More information

Cisco ParStream Cisco ParStream DSA Link Guide

Cisco ParStream Cisco ParStream DSA Link Guide Cisco ParStream Cisco ParStream DSA Link Guide January 18, 2018 2018 Cisco and/or its affiliates. Document Information: Title: Cisco ParStream DSA Link Guide Version: 4.0.1 Date Published: January 18,

More information

Cisco ParStream Cisco ParStream DSA Link Guide

Cisco ParStream Cisco ParStream DSA Link Guide Cisco ParStream Cisco ParStream DSA Link Guide 2017 Cisco and/or its affiliates. Document Information: Title: Cisco ParStream DSA Link Guide Version: 3.3.0 Date Published:

More information

In this lab we will practice creating, throwing and handling exceptions.

In this lab we will practice creating, throwing and handling exceptions. Lab 5 Exceptions Exceptions indicate that a program has encountered an unforeseen problem. While some problems place programmers at fault (for example, using an index that is outside the boundaries of

More information

CSE 142 Su 04 Computer Programming 1 - Java. Objects

CSE 142 Su 04 Computer Programming 1 - Java. Objects Objects Objects have state and behavior. State is maintained in instance variables which live as long as the object does. Behavior is implemented in methods, which can be called by other objects to request

More information

Computer Science is...

Computer Science is... Computer Science is... Automated Software Verification Using mathematical logic, computer scientists try to design tools to automatically detect runtime and logical errors in huge, complex programs. Right:

More information

COMP 250: Java Programming I. Carlos G. Oliver, Jérôme Waldispühl January 17-18, 2018 Slides adapted from M. Blanchette

COMP 250: Java Programming I. Carlos G. Oliver, Jérôme Waldispühl January 17-18, 2018 Slides adapted from M. Blanchette COMP 250: Java Programming I Carlos G. Oliver, Jérôme Waldispühl January 17-18, 2018 Slides adapted from M. Blanchette Variables and types [Downey Ch 2] Variable: temporary storage location in memory.

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

Advanced BPEL. Variable initialization. Scope. BPEL - Java Mapping. Variable Properties

Advanced BPEL. Variable initialization. Scope. BPEL - Java Mapping. Variable Properties Advanced BPEL Variable initialization When a variable is declared in a BPEL process, it has no value until one is assigned to it. From within a Java Snippet, extra care must be taken as the variable will

More information

Options for User Input

Options for User Input Options for User Input Options for getting information from the user Write event-driven code Con: requires a significant amount of new code to set-up Pro: the most versatile. Use System.in Con: less versatile

More information