|
Cisco Systems Inc. Confidential | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pcube.management.api.SMBlockingApi
public class SMBlockingApi
Subscriber Manager blocking API.
The purpose of this API is to be used by user interface systems to view & edit subscriber data on Cisco Service Control's subscriber manager.
Usage examples: TBD
For Support TBD
| Constructor Summary | |
|---|---|
SMBlockingApi()
Default constructor. |
|
SMBlockingApi(java.lang.String legName)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addSubscriber(java.lang.String subscriberName,
java.lang.String[] mappings,
short[] mappingTypes,
java.lang.String[] propertyKeys,
java.lang.String[] propertyValues,
java.lang.String[] customPropertyKeys,
java.lang.String[] customPropertyValues,
java.lang.String domain)
Creates a new subscriber record according to the given data and adds it to the SM database. |
void |
connect(java.lang.String hostname)
connect to the subscriber manager using the default port. |
void |
connect(java.lang.String hostname,
int port)
connect to the subscriber manager to a user specified port. |
void |
disconnect()
disconnects from the susbcriber manager. |
java.lang.String |
getClientVersion()
provides the rpc-client version with which this Java SM API was compiled. |
java.lang.String[] |
getDomains()
Provides the list of current subscriber domains in the SM domain repository. |
int |
getNumberOfSubscribers()
Retrieves the total number of subscribers in the SM database |
int |
getNumberOfSubscribersInDomain(java.lang.String domain)
Retrieves the number of subscribers in a subscriber domain |
java.lang.String |
getSMVersion()
gets the (peer) SM version |
java.lang.Object[] |
getSubscriber(java.lang.String subscriberName)
Retrieves subscriber record. |
java.lang.String |
getSubscriberNameByMapping(java.lang.String mapping,
short mappingType,
java.lang.String domain)
Finds a subscriber name according to a mapping and a domain. |
java.lang.String[] |
getSubscriberNames(java.lang.String lastBulkEnd,
int numOfSubscribers)
Gets names of subscribers in the SM database, starting with lastBulkEnd followed by the next numOfSubscribers subscribers (in alphabetical order). |
java.lang.String[] |
getSubscriberNames(java.lang.String lastBulk,
java.lang.String propName,
java.lang.String propValue,
int numOfSubs)
Gets names of logged in subscribers in the SM database, starting with lastBulkEnd and having the propertyName, propertyValue pair followed by the next numOfSubscribers subscribers (in alphabetical order). |
java.lang.String[] |
getSubscriberNamesInDomain(java.lang.String lastBulkEnd,
int numOfSubscribers,
java.lang.String domain)
Gets subscribers in the SM database that are associated with the specified domain. |
java.lang.String[] |
getSubscriberNamesWithPrefix(java.lang.String lastBulkEnd,
int numOfSubscribers,
java.lang.String prefix)
Gets subscribers in the SM database whose name begins with a specified prefix. |
java.lang.String[] |
getSubscriberNamesWithSuffix(java.lang.String lastBulkEnd,
int numOfSubscribers,
java.lang.String suffix)
Gets subscribers in the SM database whose names end with the specified suffix. |
void |
init(java.util.Properties properties)
Initiates some configuration parameters of the client. |
boolean |
isConnected()
tests whether the client is connected |
void |
login(java.lang.String subscriberName,
java.lang.String[] mappings,
short[] mappingTypes,
java.lang.String[] propertyKeys,
java.lang.String[] propertyValues,
java.lang.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. |
void |
loginCable(java.lang.String CPE,
java.lang.String CM,
java.lang.String IP,
int lease,
java.lang.String domain,
java.lang.String[] propertyKeys,
java.lang.String[] propertyValues)
A log-in method adapted for the cable environment (calls the cable support module in the SM). |
boolean |
logoutByMapping(java.lang.String mapping,
short mappingType,
java.lang.String domain)
Locates a subscriber based on domain and mapping, and removes the mapping (the subscriber stays in the database). |
boolean |
logoutByName(java.lang.String subscriberName,
java.lang.String[] mappings,
short[] mappingTypes)
Locates the subscriber in the database and removes mappings from it |
boolean |
logoutByNameFromDomain(java.lang.String subscriberName,
java.lang.String[] mappings,
short[] mappingTypes,
java.lang.String domain)
Similar to logoutByName, but also lets the caller provide the name of the domain to which the subscriber belongs. |
boolean |
logoutCable(java.lang.String CPE,
java.lang.String CM,
java.lang.String IP,
java.lang.String domain)
Indicates a logout (CPE becoming offline) event to the SM cable support module. |
void |
removeAllSubscribers()
Removes all subscribers from the SM, leaving the database with no subscribers. |
void |
removeCustomProperties(java.lang.String subscriberName,
java.lang.String[] customProperties)
remove the specified custom properties of a subscriber. |
boolean |
removeSubscriber(java.lang.String subscriberName)
Removes a subscriber completely from the SM database. |
void |
setDisconnectListener(DisconnectListener disconnectListener)
Sets a disconnect listener. |
void |
setPropertiesToDefault(java.lang.String subscriberName,
java.lang.String[] properties)
Resets the specified application properties of a subscriber. |
void |
setReplyTimeout(long _timeout)
sets a timeout, after which the methods of this API will return (with an exception) if the result has not yet arrived. |
boolean |
subscriberExists(java.lang.String subscriberName)
Verifies that a subscriber exists in the SM database. |
boolean |
subscriberLoggedIn(java.lang.String subscriberName)
Checks whether a subscriber that already exists in the SM database is logged in, that is, if the subscriber also exists in some SCE database. |
java.lang.String |
toString()
Automatically generated method: toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SMBlockingApi()
public SMBlockingApi(java.lang.String legName)
Note:: The LEG name will be appended with the following suffix: .B.SM-API.J
For example,
If the legName is 'my-leg.10.1.12.45-version-1.0' then the actual legName sent at the greeting to the RPC server is 'my-leg.10.1.12.45-version-1.0.B.SM-API.J'
legName - the name describing this LEG for failover. to enable several API instances to work from several
hosts, it is recommended to include the hostname as part of the LEG name.| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic void init(java.util.Properties properties)
properties - To find out which properties are configurable using this API please address Cisco's support.
public void connect(java.lang.String hostname)
throws java.lang.Exception
hostname - a host running the SM software
java.lang.Exception
public void connect(java.lang.String hostname,
int port)
throws java.lang.Exception
hostname - a host running the SM softwareport - the port number on which the SM's rpc server listens
java.lang.Exceptionpublic void disconnect()
public boolean isConnected()
public java.lang.String getClientVersion()
public java.lang.String getSMVersion()
public void setDisconnectListener(DisconnectListener disconnectListener)
Sets a disconnect listener.
The API supports only a single disconnect listener. The listener is notified when the API looses connection with the SM.
Important Note:The disconnect listener should not perform long operations from the calling thread. Performing long operations due to a disconnection event should be done in a separate thread. Not following this (strong) recommendation might result in resource leakage on the client side.
disconnectListener - public final void setReplyTimeout(long _timeout)
sets a timeout, after which the methods of this API will return (with an exception) if the result has not yet arrived. The defulat timeout is to wait for ever.
The timeout can be set again and again before each method call.
_timeout - either a positive number which is the number of miliseconds to wait or zero - wait forever
public void login(java.lang.String subscriberName,
java.lang.String[] mappings,
short[] mappingTypes,
java.lang.String[] propertyKeys,
java.lang.String[] propertyValues,
java.lang.String domain,
boolean isMappingAdditive,
int autoLogoutTime)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
subscriberName - See the susbcriber name
section in the overviewmappings - See the mappings section in the
overview. If no mappings are specified, and the isMappingAdditive flag is TRUE, the
previous mappings will be retained. If no such mappings exist, the operation will fail.mappingTypes - See the mappings
section in the overview.propertyKeys - See the properties
section in the overview.propertyValues - See the properties
section in the overview.domain - See the domains section in
the overview. If domain is NULL, but the subscriber already has a domain, the existing domain
will be retained.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.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
if already exist in SM. Negative value: disables any expiration time that might have been
set for these mappings.
java.lang.InterruptedException - See the
reply timeout
and operation timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout
and operation timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public boolean logoutByName(java.lang.String subscriberName,
java.lang.String[] mappings,
short[] mappingTypes)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
subscriberName - See the
susbcriber name section in the overview.mappings - See the
mappings section in the overview. If no mappings
are specified, all the subscriber mappings will be removed.mappingTypes - See the
mappings section in the overview.
java.lang.InterruptedException - See the
reply timeout and
operation timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and
operation timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public boolean logoutByNameFromDomain(java.lang.String subscriberName,
java.lang.String[] mappings,
short[] mappingTypes,
java.lang.String domain)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
subscriberName - See the susbcriber name
section in the overviewmappings - See the
mappings section in the overview. If no mappings are
specified, all the subscriber mappings will be removed.mappingTypes - See the mappings
section in the overview.domain - See the
domains section in the overview. The operation will fail
if: The domain is null, but the subscriber exists in the database and belongs to a domain.
OR The domain specified is incorrect.
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public boolean logoutByMapping(java.lang.String mapping,
short mappingType,
java.lang.String domain)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
mapping - See the
mappings section in the overview.mappingType - See the
mappings section in the overview.domain - See the domains section in the overview.
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public void loginCable(java.lang.String CPE,
java.lang.String CM,
java.lang.String IP,
int lease,
java.lang.String domain,
java.lang.String[] propertyKeys,
java.lang.String[] propertyValues)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
A log-in method adapted for the cable environment (calls the cable support module in the SM). This method is designed to add log-in CPEs to the SM. To log in a CM, specify the CM MAC address in both CPE and CM arguments. For additional information, see the appendix Cable Environmant of the 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 - A unique identifier of the CPE (usually a MAC address)CM - A unique identifier of the CPE (usually a MAC address)IP - the CPE IP address. See the
mappings section in the overview for formatting
specification.lease - the CPE lease time in secondsdomain - See the
domains section in the overview. the CPE domain is
usually a CMTS name. Note: Domain aliases must be set on the SM in order for the CMTS IP to be correctly
interpreted as a domain name.propertyKeys - See the
properties section in the overview. If the CPE is
provided with partial or no application properties, the values for the missing application properties will
be 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
properties section in the overview.
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public boolean logoutCable(java.lang.String CPE,
java.lang.String CM,
java.lang.String IP,
java.lang.String domain)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
CPE - See the loginCable methodCM - See the loginCable methodIP - See the loginCable methoddomain - See the loginCable method
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public void addSubscriber(java.lang.String subscriberName,
java.lang.String[] mappings,
short[] mappingTypes,
java.lang.String[] propertyKeys,
java.lang.String[] propertyValues,
java.lang.String[] customPropertyKeys,
java.lang.String[] customPropertyValues,
java.lang.String domain)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
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),
A will be left with no mappings. However, calling the login operation with these NULL-value parameters will
not change AB's mappings. A will be left with the previous IP mapping: IP1.
subscriberName - See the
susbcriber name section in the overviewmappings - See the
mappings section in the overview.mappingTypes - See the
mappings section in the overview.propertyKeys - See the
properties section in the overview.propertyValues - See the
properties section in the overview.customPropertyKeys - See
the custom-properties section in the overview.customPropertyValues - See the
custom-properties section in the overview.domain - See the
domains section in the overview. A NULL value indicates
that the subscriber is domain-less.
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public boolean removeSubscriber(java.lang.String subscriberName)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
subscriberName - See the
susbcriber name section in the overview
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public java.lang.String[] getSubscriberNames(java.lang.String lastBulk,
java.lang.String propName,
java.lang.String propValue,
int numOfSubs)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
lastBulkEnd - : Last subscriber name from last bulk. propName - The property Name on which the subscribers needs to be retrivedpropValue - The value of the above propertynumOfSubscribers - Limit on number of subscribers that will be returned. If this value is higher then
the SM limit (1000), the SM limit will be used. Note: Providing values higher than 500 to this parameter is
not recommended.
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public void removeAllSubscribers()
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public int getNumberOfSubscribers()
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public int getNumberOfSubscribersInDomain(java.lang.String domain)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
domain - A name of a subscriber domain that exists in the SM's domain repository.
See the domains section in the overview.
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public java.lang.Object[] getSubscriber(java.lang.String subscriberName)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
subscriberName - See the
susbcriber name section in the overview
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public boolean subscriberExists(java.lang.String subscriberName)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
subscriberName - See the susbcriber name
section in the overview
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public boolean subscriberLoggedIn(java.lang.String subscriberName)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
subscriberName - See the
susbcriber name section in the overview
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public java.lang.String getSubscriberNameByMapping(java.lang.String mapping,
short mappingType,
java.lang.String domain)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
mapping - See the
mappings section in the overview.mappingType - See the
mappings section in the overview.domain - See the
domains section in the overview.
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public java.lang.String[] getSubscriberNames(java.lang.String lastBulkEnd,
int numOfSubscribers)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
lastBulkEnd - : Last subscriber name from last bulk. numOfSubscribers - Limit on number of subscribers that will be returned. If this value is higher then
the SM limit (1000), the SM limit will be used. Note: Providing values higher than 500 to this parameter is
not recommended.
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public java.lang.String[] getSubscriberNamesInDomain(java.lang.String lastBulkEnd,
int numOfSubscribers,
java.lang.String domain)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
getSubscriberNames operation.
lastBulkEnd - See the getSubscriberNames methodnumOfSubscribers - See the getSubscriberNames methoddomain - The name of a subscriber domain that exists in the SM domain repository. See the
domains section in the overview.
getSubscriberNames
operation
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants,
getSubscriberNames(java.lang.String, java.lang.String, java.lang.String, int)
public java.lang.String[] getSubscriberNamesWithPrefix(java.lang.String lastBulkEnd,
int numOfSubscribers,
java.lang.String prefix)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
getSubscriberNames operation.
lastBulkEnd - See the getSubscriberNames methodnumOfSubscribers - See the getSubscriberNames methodprefix - A case-sensitive string that marks the prefix of the required subscriber names.
getSubscriberNames
operation
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants,
getSubscriberNames(java.lang.String, java.lang.String, java.lang.String, int)
public java.lang.String[] getSubscriberNamesWithSuffix(java.lang.String lastBulkEnd,
int numOfSubscribers,
java.lang.String suffix)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
getSubscriberNames operation.
lastBulkEnd - See the getSubscriberNames methodnumOfSubscribers - See the getSubscriberNames methodsuffix - A case-sensitive string that marks the suffix of the required subscriber names.
getSubscriberNames
operation
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants,
getSubscriberNames(java.lang.String, java.lang.String, java.lang.String, int)
public java.lang.String[] getDomains()
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public void setPropertiesToDefault(java.lang.String subscriberName,
java.lang.String[] properties)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
subscriberName - See the
susbcriber name section in the overviewproperties - See the
properties section in the overview. Defines which
application properties to reset
java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
public void removeCustomProperties(java.lang.String subscriberName,
java.lang.String[] customProperties)
throws java.lang.InterruptedException,
OperationTimeoutException,
RpcErrorException
subscriberName - See the
susbcriber name section in the overviewcustomProperties - Defines which custom properties to remove.java.lang.InterruptedException - See the
reply timeout and operation
timeout exception section in the overview.
OperationTimeoutException - See the
reply timeout and operation
timeout exception section in the overview.
RpcErrorException - See the
exceptions section in the overview.SMApiConstants
|
Cisco Systems Inc. Confidential | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||