Cisco Systems Inc. Confidential

com.scms.api.sce.prpc
Class PRPC_SCESubscriberApi

java.lang.Object
  extended by com.scms.api.sce.prpc.PRPC_SCESubscriberApi
All Implemented Interfaces:
SCESubscriberApi

public class PRPC_SCESubscriberApi
extends java.lang.Object
implements SCESubscriberApi

Author:
ygressel

Field Summary
protected  int connectTimeout
           
static int DEFAULT_CONNECT_TIMEOUT
           
static int DEFAULT_LISTENER_INVOCATIONS_TIMEOUT
           
static boolean DEFAULT_MODE
           
static int DEFAULT_REGISTER_TIMEOUT
           
static int DEFAULT_REGULAR_INVOCATIONS_TIMEOUT
           
protected  int listenerInvocationTimeout
           
protected static double OUTPUT_Q_UTIL_THRESHOLD
          threshold that indicates the limit of the allowed utilization of the output queue to the SCE.
static java.lang.String PROP_CONNECT_TIMEOUT
           
static java.lang.String PROP_LISTENER_INVOCATIONS_TIMEOUT
          Timeout used for operations that may be invoked from listener callback
static java.lang.String PROP_REGISTER_TIMEOUT
           
static java.lang.String PROP_REGULAR_INVOCATIONS_TIMEOUT
          Timeout used for all other operations
static int PRPC_DEFAULT_PORT
           
protected  int registerTimeout
           
protected  int regularInvocationTimeout
           
protected  com.pcube.management.framework.rpc.RpcSessionObjectImpl sceSession
           
static boolean VLINK_MODE
           
 
Constructor Summary
PRPC_SCESubscriberApi(java.lang.String _apiName, java.lang.String sceHost)
          Constructor:
PRPC_SCESubscriberApi(java.lang.String _apiName, java.lang.String sceHost, int scePort, long autoReconnectInterval, boolean mode)
          Constructor:
PRPC_SCESubscriberApi(java.lang.String _apiName, java.lang.String sceHost, long autoReconnectInterval)
          Constructor:
PRPC_SCESubscriberApi(java.lang.String _apiName, java.lang.String sceHost, long autoReconnectInterval, boolean vlinkMode)
          Constructor:
 
Method Summary
 void connect()
          Connects the API to the SCE.
 void createVLink(VLink vlinkData)
          This operation is used to create a VLink in SCE.
 void createVLink(VLink[] vlinkData)
          This operation is used to create multiple VLinks in SCE.
 void deleteVLink(VLink vlinkData)
          This operation is used to delete a VLink in SCE.
 void deleteVLink(VLink[] vlinkData)
          This operation is used to delete multiple VLinks in SCE
 void disconnect()
          Disconnects and API from the SCE platform.
 void enableVlinkMode()
          This operation is used to enable the VLink mode Vlink mode should be enabled before the API connects to the SCE.
protected  void finalize()
          Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
 java.lang.String getApiDebugInfo()
           
 java.lang.String getAPIName()
          This method queries the API name.
 java.lang.String getAPIVersion()
          This method queries the API version.
 int getMaxVlinks()
          This operation is used to get Maximum number of vlinks suppoerted in SCE
 void getQuotaStatuBulk(com.scms.common.Quota_BULK subsBulk, OperationResultHandler handler)
          This method is a bulk version of the getQuotaStatus method (@see getQuotaStatus)
 void getQuotaStatus(java.lang.String subscriberID, com.scms.common.Quota quota, OperationResultHandler handler)
          This operation places the request to query the current remaining quota amount of the specified set of quota buckets.
 java.lang.String getSceAgentVersion()
           
 void getSubscribersBulk(int bulkSize, com.scms.common.SubscribersBulkResponseIterator iterator, OperationResultHandler handler)
          This operation should be used in pull model synchronization process in order to retrieve bulk of subscriber the SCE is currently handling (see Pull Model Synchronization Procedure section in the user manual).
 void init(java.util.Properties properties)
          The API enables initializing certain internal properties for API customization using init method.
protected  void internalRegisterListeners()
           
 boolean isConnected()
          Verifies whether the API is connected to the SCE
 boolean isRedundancyStatusActive()
          Retreives a redundancy status of the SCE.
 boolean isVlinkEnabled()
          This operation is used to check if vlink mode is enabled in SCE.
 void login(java.lang.String subscriberID, NetworkID networkID, boolean networkIdAdditive, PolicyProfile policy, com.scms.common.QuotaOperation quota, com.scms.common.ExtendedAttributes esa, OperationResultHandler handler)
          This operation is used in order to add/update the subscriber to the SCE with the extended attributes.
 void login(java.lang.String subscriberID, NetworkID networkID, boolean networkIdAdditive, PolicyProfile policy, com.scms.common.QuotaOperation quota, OperationResultHandler handler)
          This operation is used in order to add/update the subscriber to the SCE.
 void loginBulk(Login_BULK subsBulk, OperationResultHandler handler)
          This method is a bulk version of the login method (@see login)
 void loginPullResponse(java.lang.String subscriberID, java.lang.String anonymousSubscriberID, NetworkID networkID, PolicyProfile policy, com.scms.common.QuotaOperation quota, com.scms.common.ExtendedAttributes esa, OperationResultHandler handler)
          This operation sends subscriber login information to the SCE with extended attributes as a response to a loginPullRequest call from the SCE or a loginPullBulkRequest.
 void loginPullResponse(java.lang.String subscriberID, java.lang.String anonymousSubscriberID, NetworkID networkID, PolicyProfile policy, com.scms.common.QuotaOperation quota, com.scms.common.ExtendedAttributes esa, OperationResultHandler handler, boolean isNetworkAdditive)
          This operation sends subscriber login information to the SCE with extended attributes as a response to a loginPullRequest call from the SCE or a loginPullBulkRequest.
 void loginPullResponse(java.lang.String subscriberID, java.lang.String anonymousSubscriberID, NetworkID networkID, PolicyProfile policy, com.scms.common.QuotaOperation quota, OperationResultHandler handler)
          This operation sends subscriber login information to the SCE as a response to a loginPullRequest call from the SCE or a loginPullBulkRequest.
 void loginPullResponse(java.lang.String subscriberID, java.lang.String anonymousSubscriberID, NetworkID networkID, PolicyProfile policy, com.scms.common.QuotaOperation quota, OperationResultHandler handler, boolean isNetworkAdditive)
          This operation sends subscriber login information to the SCE as a response to a loginPullRequest call from the SCE or a loginPullBulkRequest.
 void loginPullResponseBulk(LoginPullResponse_BULK subsBulk, OperationResultHandler handler)
          This method is a bulk version of the loginPullResponse method (@see loginPullResponse)
 void logout(java.lang.String subscriberID, NetworkID networkID, OperationResultHandler handler)
          This operation removes the specified networkID of the subscriber from the SCE.
 void logoutBulk(NetworkAndSubscriberID_BULK subsBulk, OperationResultHandler handler)
          This method is a bulk version of the logout method (@see logout)
 void networkIDUpdate(java.lang.String subscriberID, NetworkID networkID, boolean networkIdAdditive, OperationResultHandler handler)
          This operation adds\replaces an existing subscriber's network ID.
 void networkIDUpdateBulk(NetworkAndSubscriberID_BULK subsBulk, OperationResultHandler handler)
          This method is a bulk version of the networkIDUpdate method (@see networkIDUpdate)
 void policyProfileUpdate(java.lang.String subscriberID, PolicyProfile policy, OperationResultHandler handler)
          This operation modifies an existing subscriber's policy profile.
 void policyProfileUpdateBulk(PolicyProfile_BULK subsBulk, OperationResultHandler handler)
          This method is a bulk version of the policyProfileUpdate method (@see policyProfileUpdate)
 void quotaUpdate(java.lang.String subscriberID, com.scms.common.QuotaOperation quotaOperation, OperationResultHandler handler)
          This operation adds/sets the values of the subscriber's quota.
 void quotaUpdateBulk(com.scms.common.QuotaOperation_BULK subsBulk, OperationResultHandler handler)
          This method is a bulk version of the quotaUpdate method (@see quotaUpdate)
 void registerLoginPullListener(LoginPullListener listener)
           
 void registerLogoutListener(LogoutListener listener)
          This method sets a logout indications listener.
 void registerQuotaListener(QuotaListener listener)
          This method sets a quota indications listener.
 void setConnectionListener(ConnectionListener listener)
          The API monitors the connection to the SCE platform.
 void setQuotaFactory(com.scms.api.sce.QuotaFactory quotaFctr)
          for internal use only
 void setRedundancyStateListener(com.scms.api.sce.RedundancyStateListener listener)
           
protected  void setTimeouts(java.util.Properties properties)
           
 void synchronizePullEnd(boolean success, OperationResultHandler handler)
          This operation should be used in pull model only in order to signal the SCE that synchronization with the server has ended.
 void synchronizePullStart(OperationResultHandler handler)
          This operation should be used in pull model only in order to signal the SCE that synchronization with the server should be started.
 void synchronizePushEnd(boolean success, OperationResultHandler handler)
          This operation should be used in push mode only in order to signal the SCE that synchronization with the server has ended.
 void synchronizePushStart(OperationResultHandler handler)
          This operation should be used in push model only in order to signal the SCE that synchronization with the server is about to be started.
 java.lang.String toString()
          Automatically generated method: toString
 void unregisterLoginPullListener()
          This method removes a pull indications listener.
 void unregisterLogoutListener()
          This method removes a logout indications listener.
 void unregisterQuotaListener()
          This method removes a quota indications listener.
 void updateVLink(VLink vlinkData)
          This operation is used to update a VLink in SCE
 void updateVLink(VLink[] vlinkData)
          This operation is used to update multiple VLinks in SCE
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VLINK_MODE

public static boolean VLINK_MODE

DEFAULT_MODE

public static final boolean DEFAULT_MODE
See Also:
Constant Field Values

PRPC_DEFAULT_PORT

public static final int PRPC_DEFAULT_PORT
See Also:
Constant Field Values

sceSession

protected com.pcube.management.framework.rpc.RpcSessionObjectImpl sceSession

DEFAULT_LISTENER_INVOCATIONS_TIMEOUT

public static final int DEFAULT_LISTENER_INVOCATIONS_TIMEOUT
See Also:
Constant Field Values

DEFAULT_REGULAR_INVOCATIONS_TIMEOUT

public static final int DEFAULT_REGULAR_INVOCATIONS_TIMEOUT
See Also:
Constant Field Values

DEFAULT_CONNECT_TIMEOUT

public static final int DEFAULT_CONNECT_TIMEOUT
See Also:
Constant Field Values

DEFAULT_REGISTER_TIMEOUT

public static final int DEFAULT_REGISTER_TIMEOUT
See Also:
Constant Field Values

OUTPUT_Q_UTIL_THRESHOLD

protected static final double OUTPUT_Q_UTIL_THRESHOLD
threshold that indicates the limit of the allowed utilization of the output queue to the SCE. this threshold should be used to prevent a calls to the user's listener on events from the SCE that trigger a response to the SCE. this prevents flooding the SCE with more messages than it can handle.

See Also:
Constant Field Values

PROP_LISTENER_INVOCATIONS_TIMEOUT

public static final java.lang.String PROP_LISTENER_INVOCATIONS_TIMEOUT
Timeout used for operations that may be invoked from listener callback

See Also:
Constant Field Values

PROP_REGULAR_INVOCATIONS_TIMEOUT

public static final java.lang.String PROP_REGULAR_INVOCATIONS_TIMEOUT
Timeout used for all other operations

See Also:
Constant Field Values

PROP_CONNECT_TIMEOUT

public static final java.lang.String PROP_CONNECT_TIMEOUT
See Also:
Constant Field Values

PROP_REGISTER_TIMEOUT

public static final java.lang.String PROP_REGISTER_TIMEOUT
See Also:
Constant Field Values

listenerInvocationTimeout

protected int listenerInvocationTimeout

regularInvocationTimeout

protected int regularInvocationTimeout

connectTimeout

protected int connectTimeout

registerTimeout

protected int registerTimeout
Constructor Detail

PRPC_SCESubscriberApi

public PRPC_SCESubscriberApi(java.lang.String _apiName,
                             java.lang.String sceHost)
                      throws java.net.UnknownHostException
Constructor:

Parameters:
_apiName - - The name should be unique per SCE - constructing more than one API with the same name connected to a certain SCE will be handled by the SCE platform as one API client. This feature should be used when high-availability is supported. For more information about high availability read High Availability section in SCE Subscriber Java API Programmer's Guide.
sceHost - - can be either an IP address or a reachable hostname
Throws:
java.net.UnknownHostException

PRPC_SCESubscriberApi

public PRPC_SCESubscriberApi(java.lang.String _apiName,
                             java.lang.String sceHost,
                             long autoReconnectInterval)
                      throws java.net.UnknownHostException
Constructor:

Parameters:
_apiName - - The name should be unique per SCE - constructing more than one API with the same name connected to a certain SCE will be handled by the SCE platform as one API client. This feature should be used when high-availability is supported. For more information about high availability read High Availability section in SCE Subscriber Java API Programmer's Guide.
sceHost - - can be either an IP address or a reachable hostname
autoReconnectInterval - - Defines the interval (in milliseconds) for attempting reconnection by the reconnection task, as follows: value is 0 or less: the reconnection task is not activated (no auto-reconnect is attempted). value is greater than 0: in case of connection failure, the reconnection task will be activated every milliseconds. Default value: -1 (no auto-reconnect is attempted).
Throws:
java.net.UnknownHostException

PRPC_SCESubscriberApi

public PRPC_SCESubscriberApi(java.lang.String _apiName,
                             java.lang.String sceHost,
                             long autoReconnectInterval,
                             boolean vlinkMode)
                      throws java.net.UnknownHostException
Constructor:

Parameters:
_apiName - - The name should be unique per SCE - constructing more than one API with the same name connected to a certain SCE will be handled by the SCE platform as one API client. This feature should be used when high-availability is supported. For more information about high availability read High Availability section in SCE Subscriber Java API Programmer's Guide.
sceHost - - can be either an IP address or a reachable hostname
autoReconnectInterval - - Defines the interval (in milliseconds) for attempting reconnection by the reconnection task, as follows: value is 0 or less: the reconnection task is not activated (no auto-reconnect is attempted). value is greater than 0: in case of connection failure, the reconnection task will be activated every milliseconds. Default value: -1 (no auto-reconnect is attempted).
vlinkMode - - In case to use VLink APIs, vlinkMode should be given true.
Throws:
java.net.UnknownHostException

PRPC_SCESubscriberApi

public PRPC_SCESubscriberApi(java.lang.String _apiName,
                             java.lang.String sceHost,
                             int scePort,
                             long autoReconnectInterval,
                             boolean mode)
                      throws java.net.UnknownHostException
Constructor:

Parameters:
_apiName - - The name should be unique per SCE - constructing more than one API with the same name connected to a certain SCE will be handled by the SCE platform as one API client. This feature should be used when high-availability is supported. For more information about high availability read High Availability section in SCE Subscriber Java API Programmer's Guide.
sceHost - - can be either an IP address or a reachable hostname
scePort - - PRPC protocol TCP port to connect to the SCE (default value is 14374)
autoReconnectInterval - - Defines the interval (in milliseconds) for attempting reconnection by the reconnection task, as follows: value is 0 or less: the reconnection task is not activated (no auto-reconnect is attempted). value is greater than 0: in case of connection failure, the reconnection task will be activated every milliseconds. Default value: -1 (no auto-reconnect is attempted).
mode - - In case to use VLink APIs, mode should be given true.
Throws:
java.net.UnknownHostException
Method Detail

toString

public java.lang.String toString()
Automatically generated method: toString

Overrides:
toString in class java.lang.Object

init

public void init(java.util.Properties properties)
          throws java.lang.Exception
The API enables initializing certain internal properties for API customization using init method. Note For settings to take effect, the init method must be called before the connect method. The following properties can be set: Output queue size: the internal buffer size defining the maximum number of requests that can be accumulated by the API until they are sent to the SCE (Default: 1024) Operation timeout: a hint regarding the desired timeout (in milliseconds) on a non-responding PRPC protocol connection (the default is 45 seconds),

Parameters:
properties - To set output queue size, use prpc.client.output.machinemode.recordnum as a property key To set operation timeout use com.scms.api.sce.prpc.regularInvocationTimeout or com.scms.api.sce.prpc.listenerInvocationTimeout as a property key
Throws:
java.lang.Exception

setTimeouts

protected void setTimeouts(java.util.Properties properties)

isRedundancyStatusActive

public final boolean isRedundancyStatusActive()
Description copied from interface: SCESubscriberApi
Retreives a redundancy status of the SCE. It should be used in cascade topology before performing any logon operation on the SCE since logon oerations are not allowed on standby SCE.

Specified by:
isRedundancyStatusActive in interface SCESubscriberApi
Returns:
This method returns TRUE if redundancy status of the SCE is active and FALSE otherwise

setQuotaFactory

public final void setQuotaFactory(com.scms.api.sce.QuotaFactory quotaFctr)
for internal use only

Parameters:
quotaFctr -

connect

public void connect()
             throws java.lang.Exception
Connects the API to the SCE. If the auto-reconnect feature is used the API will handle any disconnection from this point on.

Specified by:
connect in interface SCESubscriberApi
Throws:
java.lang.Exception

internalRegisterListeners

protected void internalRegisterListeners()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

disconnect

public void disconnect()
                throws java.lang.Exception
Disconnects and API from the SCE platform. Note: it does not unregister any registered listeners. In order to cleanup the resources you should unregister all listeners implicitly.

Specified by:
disconnect in interface SCESubscriberApi
Throws:
java.lang.Exception

finalize

protected void finalize()
                 throws java.lang.Throwable
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup. calls disconnect()

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable - the Exception raised by this method

setConnectionListener

public void setConnectionListener(ConnectionListener listener)
The API monitors the connection to the SCE platform. Policy Server that wants to be able to perform certain operations on connection establishment/disconnection from the SCE need to implement a ConnectionListener interface and register it using the following method.

Specified by:
setConnectionListener in interface SCESubscriberApi
Parameters:
listener - - listener to set

setRedundancyStateListener

public void setRedundancyStateListener(com.scms.api.sce.RedundancyStateListener listener)
Specified by:
setRedundancyStateListener in interface SCESubscriberApi

isConnected

public boolean isConnected()
Verifies whether the API is connected to the SCE

Specified by:
isConnected in interface SCESubscriberApi
Returns:
true - API is connected to the SCE false - API is not connected

login

public void login(java.lang.String subscriberID,
                  NetworkID networkID,
                  boolean networkIdAdditive,
                  PolicyProfile policy,
                  com.scms.common.QuotaOperation quota,
                  OperationResultHandler handler)
           throws java.lang.Exception
This operation is used in order to add/update the subscriber to the SCE. The operation is performed according to the following logic: 1)If subscriber ID does not exists in the SCE - a new subscriber is added with all the data supplied 2)If the subscriber ID exists: 2.1)If networkIdAdditive flag is set to TRUE - the supplied NetworkID is added to the existing networkIDs of the subscriber otherwise the supplied networkID replaces the existing networkIDs. 2.2)Policy - policy is updated with the new policy values. Subscriber Policy entries that are not received within the PolicyProfile object remain unchanged. 2.3)Quota - quota is updated according to the applications definition 6)In case there is NetworkID congestion with another subscriber - NetworkID of the other subscriber is logged out implicitly. This operation is used in push mode only.

Specified by:
login in interface SCESubscriberApi
Parameters:
subscriberID - - the ID of the subscriber
networkID - - networkID of the subscriber (IP, VLAN, etc.)
networkIdAdditive - - flag indicating whether to add the networkIDs to the existing ones
policy - - policy profile of the subscriber
quota - - quota operation of the subscriber
handler - - operation result handler - used for returning the operation results
Throws:
java.lang.Exception

login

public void login(java.lang.String subscriberID,
                  NetworkID networkID,
                  boolean networkIdAdditive,
                  PolicyProfile policy,
                  com.scms.common.QuotaOperation quota,
                  com.scms.common.ExtendedAttributes esa,
                  OperationResultHandler handler)
           throws java.lang.Exception
This operation is used in order to add/update the subscriber to the SCE with the extended attributes. The operation is performed according to the following logic: 1)If subscriber ID does not exists in the SCE - a new subscriber is added with all the data supplied 2)If the subscriber ID exists: 2.1)If networkIdAdditive flag is set to TRUE - the supplied NetworkID is added to the existing networkIDs of the subscriber otherwise the supplied networkID replaces the existing networkIDs. 2.2)Policy - policy is updated with the new policy values. Subscriber Policy entries that are not received within the PolicyProfile object remain unchanged. 2.3)Quota - quota is updated according to the applications definition 6)In case there is NetworkID congestion with another subscriber - NetworkID of the other subscriber is logged out implicitly. This operation is used in push mode only.

Specified by:
login in interface SCESubscriberApi
Parameters:
subscriberID - - the ID of the subscriber
networkID - - networkID of the subscriber (IP, VLAN, etc.)
networkIdAdditive - - flag indicating whether to add the networkIDs to the existing ones
policy - - policy profile of the subscriber
quota - - quota operation of the subscriber
esa - - ExtendedAttributes of the subscriber
handler - - operation result handler - used for returning the operation results
Throws:
java.lang.Exception
Since:
SCE 3.6.5 Version

networkIDUpdate

public void networkIDUpdate(java.lang.String subscriberID,
                            NetworkID networkID,
                            boolean networkIdAdditive,
                            OperationResultHandler handler)
                     throws java.lang.Exception
This operation adds\replaces an existing subscriber's network ID. This operation is used in both push and pull modes.

Specified by:
networkIDUpdate in interface SCESubscriberApi
Parameters:
subscriberID - - the ID of the subscriber
networkID - - networkID of the subscriber (IP, VLAN, etc.)
networkIdAdditive - - flag indicating whether to add the networkIDs to the existing ones
handler - - operation result handler - used for returning the operation results
Throws:
java.lang.Exception

logout

public void logout(java.lang.String subscriberID,
                   NetworkID networkID,
                   OperationResultHandler handler)
            throws java.lang.Exception
This operation removes the specified networkID of the subscriber from the SCE. If this is the last networkID of the specified subscriber - the subscriber is removed from the SCE. . If no subscriber ID is specified the supplied network ID is removed from the SCE regardless to which subscriber this network ID belongs to. If no network ID is supplied then all Network IDs of this subscriber are removed. This operation can be used in both the push/pull modes.

Specified by:
logout in interface SCESubscriberApi
Parameters:
subscriberID -
networkID -
handler -
Throws:
java.lang.Exception

quotaUpdate

public void quotaUpdate(java.lang.String subscriberID,
                        com.scms.common.QuotaOperation quotaOperation,
                        OperationResultHandler handler)
                 throws java.lang.Exception
This operation adds/sets the values of the subscriber's quota. This operation can be used in pull/push modes.

Specified by:
quotaUpdate in interface SCESubscriberApi
Parameters:
subscriberID -
quotaOperation -
handler -
Throws:
java.lang.Exception

loginPullResponse

public void loginPullResponse(java.lang.String subscriberID,
                              java.lang.String anonymousSubscriberID,
                              NetworkID networkID,
                              PolicyProfile policy,
                              com.scms.common.QuotaOperation quota,
                              OperationResultHandler handler,
                              boolean isNetworkAdditive)
                       throws java.lang.Exception
This operation sends subscriber login information to the SCE as a response to a loginPullRequest call from the SCE or a loginPullBulkRequest. This operation is used in pull mode only.

Parameters:
anonymousSubscriberID - - the ID of anonymous subscriber
subscriberID - - the ID of the subscriber
networkID - - networkID of the subscriber (IP, VLAN, etc.)
policy - - policy profile of the subscriber
quota - - quota operation of the subscriber
handler - - operation result handler - used for returning the operation results
isNetworkAdditive - - Network Additive
Throws:
java.lang.Exception

loginPullResponse

public void loginPullResponse(java.lang.String subscriberID,
                              java.lang.String anonymousSubscriberID,
                              NetworkID networkID,
                              PolicyProfile policy,
                              com.scms.common.QuotaOperation quota,
                              OperationResultHandler handler)
                       throws java.lang.Exception
This operation sends subscriber login information to the SCE as a response to a loginPullRequest call from the SCE or a loginPullBulkRequest. This operation is used in pull mode only.

Specified by:
loginPullResponse in interface SCESubscriberApi
Parameters:
anonymousSubscriberID - - the ID of anonymous subscriber
subscriberID - - the ID of the subscriber
networkID - - networkID of the subscriber (IP, VLAN, etc.)
policy - - policy profile of the subscriber
quota - - quota operation of the subscriber
handler - - operation result handler - used for returning the operation results
Throws:
java.lang.Exception

loginPullResponse

public void loginPullResponse(java.lang.String subscriberID,
                              java.lang.String anonymousSubscriberID,
                              NetworkID networkID,
                              PolicyProfile policy,
                              com.scms.common.QuotaOperation quota,
                              com.scms.common.ExtendedAttributes esa,
                              OperationResultHandler handler,
                              boolean isNetworkAdditive)
                       throws java.lang.Exception
This operation sends subscriber login information to the SCE with extended attributes as a response to a loginPullRequest call from the SCE or a loginPullBulkRequest. This operation is used in pull mode only.

Parameters:
anonymousSubscriberID - - the ID of anonymous subscriber
subscriberID - - the ID of the subscriber
networkID - - networkID of the subscriber (IP, VLAN, etc.)
policy - - policy profile of the subscriber
quota - - quota operation of the subscriber
esa - - ExtendedAttributes of the subscriber
handler - - operation result handler - used for returning the operation results
isNetworkAdditive -
Throws:
java.lang.Exception
Since:
SCE 3.7.5 Version

loginPullResponse

public void loginPullResponse(java.lang.String subscriberID,
                              java.lang.String anonymousSubscriberID,
                              NetworkID networkID,
                              PolicyProfile policy,
                              com.scms.common.QuotaOperation quota,
                              com.scms.common.ExtendedAttributes esa,
                              OperationResultHandler handler)
                       throws java.lang.Exception
This operation sends subscriber login information to the SCE with extended attributes as a response to a loginPullRequest call from the SCE or a loginPullBulkRequest. This operation is used in pull mode only.

Specified by:
loginPullResponse in interface SCESubscriberApi
Parameters:
anonymousSubscriberID - - the ID of anonymous subscriber
subscriberID - - the ID of the subscriber
networkID - - networkID of the subscriber (IP, VLAN, etc.)
policy - - policy profile of the subscriber
quota - - quota operation of the subscriber
esa - - ExtendedAttributes of the subscriber
handler - - operation result handler - used for returning the operation results
Throws:
java.lang.Exception
Since:
SCE 3.6.5 Version

policyProfileUpdate

public void policyProfileUpdate(java.lang.String subscriberID,
                                PolicyProfile policy,
                                OperationResultHandler handler)
                         throws java.lang.Exception
This operation modifies an existing subscriber's policy profile. If the subscriber does not exist this operation will fail. This operation is used in both push and pull modes.

Specified by:
policyProfileUpdate in interface SCESubscriberApi
Parameters:
subscriberID - - the unique ID of the subscriber.
policy - - policy profile of the subscriber.
handler - - result handler for this operation.
Throws:
java.lang.Exception

getQuotaStatus

public void getQuotaStatus(java.lang.String subscriberID,
                           com.scms.common.Quota quota,
                           OperationResultHandler handler)
                    throws java.lang.Exception
This operation places the request to query the current remaining quota amount of the specified set of quota buckets. This request will be followed (asynchronously) by the getQuotaStatusIndication including the queried data. This operation can be used in both pull/push modes.

Specified by:
getQuotaStatus in interface SCESubscriberApi
Parameters:
subscriberID - - the unique ID of the subscriber.
quota - - should include the list of the names (without values) of the quota buckets you want to retrieve. See SCAS_BB_Quota class in order to construct quota with buckets names only.
handler - - result handler for this operation.
Throws:
java.lang.Exception

getQuotaStatuBulk

public void getQuotaStatuBulk(com.scms.common.Quota_BULK subsBulk,
                              OperationResultHandler handler)
                       throws java.lang.Exception
This method is a bulk version of the getQuotaStatus method (@see getQuotaStatus)

Specified by:
getQuotaStatuBulk in interface SCESubscriberApi
Parameters:
subsBulk - - @see Quota_BULK
handler - - result handler for this operation.
Throws:
java.lang.Exception

loginPullResponseBulk

public void loginPullResponseBulk(LoginPullResponse_BULK subsBulk,
                                  OperationResultHandler handler)
                           throws java.lang.Exception
This method is a bulk version of the loginPullResponse method (@see loginPullResponse)

Specified by:
loginPullResponseBulk in interface SCESubscriberApi
Parameters:
subsBulk - - @see LoginPullResponse_BULK
handler - - result handler for this operation.
Throws:
java.lang.Exception

loginBulk

public void loginBulk(Login_BULK subsBulk,
                      OperationResultHandler handler)
               throws java.lang.Exception
This method is a bulk version of the login method (@see login)

Specified by:
loginBulk in interface SCESubscriberApi
Parameters:
subsBulk - - @see Login_BULK
handler - - result handler for this operation.
Throws:
java.lang.Exception

logoutBulk

public void logoutBulk(NetworkAndSubscriberID_BULK subsBulk,
                       OperationResultHandler handler)
                throws java.lang.Exception
This method is a bulk version of the logout method (@see logout)

Specified by:
logoutBulk in interface SCESubscriberApi
Parameters:
subsBulk - - @see NetworkAndSubscriberID_BULK
handler - - result handler for this operation.
Throws:
java.lang.Exception

policyProfileUpdateBulk

public void policyProfileUpdateBulk(PolicyProfile_BULK subsBulk,
                                    OperationResultHandler handler)
                             throws java.lang.Exception
This method is a bulk version of the policyProfileUpdate method (@see policyProfileUpdate)

Specified by:
policyProfileUpdateBulk in interface SCESubscriberApi
Parameters:
subsBulk - - @see PolicyProfile_BULK
handler - - result handler for this operation.
Throws:
java.lang.Exception

networkIDUpdateBulk

public void networkIDUpdateBulk(NetworkAndSubscriberID_BULK subsBulk,
                                OperationResultHandler handler)
                         throws java.lang.Exception
This method is a bulk version of the networkIDUpdate method (@see networkIDUpdate)

Specified by:
networkIDUpdateBulk in interface SCESubscriberApi
Parameters:
subsBulk - - @see NetworkAndSubscriberID_BULK
handler - - result handler for this operation.
Throws:
java.lang.Exception

quotaUpdateBulk

public void quotaUpdateBulk(com.scms.common.QuotaOperation_BULK subsBulk,
                            OperationResultHandler handler)
                     throws java.lang.Exception
This method is a bulk version of the quotaUpdate method (@see quotaUpdate)

Specified by:
quotaUpdateBulk in interface SCESubscriberApi
Parameters:
subsBulk - - @see QuotaOperation_BULK
handler - - result handler for this operation.
Throws:
java.lang.Exception

registerLoginPullListener

public void registerLoginPullListener(LoginPullListener listener)
                               throws java.lang.Exception
Specified by:
registerLoginPullListener in interface SCESubscriberApi
Throws:
java.lang.Exception

unregisterLoginPullListener

public void unregisterLoginPullListener()
                                 throws java.lang.Exception
This method removes a pull indications listener. Note: After this method is called no login-pull indications will be received

Specified by:
unregisterLoginPullListener in interface SCESubscriberApi
Throws:
java.lang.Exception

registerLogoutListener

public void registerLogoutListener(LogoutListener listener)
                            throws java.lang.Exception
This method sets a logout indications listener. Note: SCE supports single logout indications listener therefore any call to registerLogoutListener method will automatically deregister any previous logout listener.

Specified by:
registerLogoutListener in interface SCESubscriberApi
Parameters:
listener - - Listener provided by the user
Throws:
java.lang.Exception

unregisterLogoutListener

public void unregisterLogoutListener()
                              throws java.lang.Exception
This method removes a logout indications listener. Note: After this method is called no logout indications will be received

Specified by:
unregisterLogoutListener in interface SCESubscriberApi
Throws:
java.lang.Exception

registerQuotaListener

public void registerQuotaListener(QuotaListener listener)
This method sets a quota indications listener. Note: SCE supports single quota indications listener therefore any call to registerQuotaListener method will automatically deregister any previous quota listener.

Specified by:
registerQuotaListener in interface SCESubscriberApi
Parameters:
listener - - Listener provided by the user

unregisterQuotaListener

public void unregisterQuotaListener()
                             throws java.lang.Exception
This method removes a quota indications listener. Note: After this method is called no quota indications will be received

Specified by:
unregisterQuotaListener in interface SCESubscriberApi
Throws:
java.lang.Exception

synchronizePushStart

public void synchronizePushStart(OperationResultHandler handler)
                          throws java.lang.Exception
This operation should be used in push model only in order to signal the SCE that synchronization with the server is about to be started. The SCE marks all of the subscriber data with a "dirty-bit" which is reset if this data is re-applied as part of the synchronization process. Every call to this method restarts the synchronization process.

Specified by:
synchronizePushStart in interface SCESubscriberApi
Parameters:
handler - - result handler for this operation.
Throws:
java.lang.Exception

synchronizePushEnd

public void synchronizePushEnd(boolean success,
                               OperationResultHandler handler)
                        throws java.lang.Exception
This operation should be used in push mode only in order to signal the SCE that synchronization with the server has ended. The SCE scans the entire subscriber database for data with the "dirty-bit" assigned at synchronizePushStart and removed it.

Specified by:
synchronizePushEnd in interface SCESubscriberApi
Parameters:
success - - flag indicating the SCE whether the synchronization was successful.
handler - - result handler for this operation.
Throws:
java.lang.Exception

synchronizePullStart

public void synchronizePullStart(OperationResultHandler handler)
                          throws java.lang.Exception
This operation should be used in pull model only in order to signal the SCE that synchronization with the server should be started.

Specified by:
synchronizePullStart in interface SCESubscriberApi
Parameters:
handler - - result handler for this operation
Throws:
java.lang.Exception

synchronizePullEnd

public void synchronizePullEnd(boolean success,
                               OperationResultHandler handler)
                        throws java.lang.Exception
This operation should be used in pull model only in order to signal the SCE that synchronization with the server has ended.

Parameters:
success - - flag indicating the SCE whether the synchronization was successful.
handler - - result handler for this operation
Throws:
java.lang.Exception

getSubscribersBulk

public void getSubscribersBulk(int bulkSize,
                               com.scms.common.SubscribersBulkResponseIterator iterator,
                               OperationResultHandler handler)
                        throws java.lang.Exception
This operation should be used in pull model synchronization process in order to retrieve bulk of subscriber the SCE is currently handling (see Pull Model Synchronization Procedure section in the user manual). Upon receiving this request (getSubscribersBulk) the SCE issues asynchronously the getSubscribersBulkResponse indication containing subscriberIDs and corresponding NetworkIDs (see LoginPullListener Class). One of the indication parameters is isLastBulk flag that should be checked before calling to the next call to the getSubscribersBulk .

Specified by:
getSubscribersBulk in interface SCESubscriberApi
Parameters:
bulkSize - - the size of the bulk (maximum bulk size is 100 entries)
iterator - - iterator of the subscribers at the SCE side. This iterator is received in getSubscribersBulkIndication and it should be passed to the next call to getSubscribersBulk method. When calling first time to the getSubscribersBulk method - use null as an iterator (using null indicates that you want to start from the beginning).
handler - - result handler for this operation.
Throws:
java.lang.Exception

getAPIVersion

public java.lang.String getAPIVersion()
This method queries the API version.

Specified by:
getAPIVersion in interface SCESubscriberApi
Returns:
- version string formatted as .

getAPIName

public java.lang.String getAPIName()
This method queries the API name.

Specified by:
getAPIName in interface SCESubscriberApi
Returns:
API name provided by the user

getSceAgentVersion

public java.lang.String getSceAgentVersion()
                                    throws java.lang.Exception
Specified by:
getSceAgentVersion in interface SCESubscriberApi
Throws:
java.lang.Exception

getApiDebugInfo

public java.lang.String getApiDebugInfo()
Returns:
internal API debug and statistics information which can be logged periodically and used for troubleshooting with Cisco support

createVLink

public void createVLink(VLink vlinkData)
                 throws VLinkDisabledException,
                        VLinkModeException
This operation is used to create a VLink in SCE.

Specified by:
createVLink in interface SCESubscriberApi
Parameters:
vlinkData - - Vlink Data
Throws:
VLinkDisabledException,VLinkModeException
VLinkDisabledException
VLinkModeException

createVLink

public void createVLink(VLink[] vlinkData)
                 throws VLinkDisabledException,
                        VLinkModeException
This operation is used to create multiple VLinks in SCE.

Specified by:
createVLink in interface SCESubscriberApi
Parameters:
vlinkData - - Array of Vlink Data
Throws:
VLinkDisabledException,VLinkModeException
VLinkDisabledException
VLinkModeException

deleteVLink

public void deleteVLink(VLink vlinkData)
                 throws VLinkDisabledException,
                        VLinkModeException
This operation is used to delete a VLink in SCE.

Specified by:
deleteVLink in interface SCESubscriberApi
Parameters:
vlinkData - - Vlink Data
Throws:
VLinkDisabledException,VLinkModeException
VLinkDisabledException
VLinkModeException

deleteVLink

public void deleteVLink(VLink[] vlinkData)
                 throws VLinkDisabledException,
                        VLinkModeException
This operation is used to delete multiple VLinks in SCE

Specified by:
deleteVLink in interface SCESubscriberApi
Parameters:
vlinkData - - Array of Vlink Data
Throws:
VLinkDisabledException,VLinkModeException
VLinkDisabledException
VLinkModeException

updateVLink

public void updateVLink(VLink vlinkData)
                 throws VLinkDisabledException,
                        VLinkModeException
This operation is used to update a VLink in SCE

Specified by:
updateVLink in interface SCESubscriberApi
Parameters:
vlinkData - - Vlink Data
Throws:
VLinkDisabledException,VLinkModeException
VLinkDisabledException
VLinkModeException

updateVLink

public void updateVLink(VLink[] vlinkData)
                 throws VLinkDisabledException,
                        VLinkModeException
This operation is used to update multiple VLinks in SCE

Specified by:
updateVLink in interface SCESubscriberApi
Parameters:
vlinkData - - Array of Vlink Data
Throws:
VLinkDisabledException,VLinkModeException
VLinkDisabledException
VLinkModeException

getMaxVlinks

public int getMaxVlinks()
                 throws VLinkDisabledException,
                        VLinkModeException
This operation is used to get Maximum number of vlinks suppoerted in SCE

Specified by:
getMaxVlinks in interface SCESubscriberApi
Throws:
VLinkDisabledException,VLinkModeException
VLinkDisabledException
VLinkModeException

isVlinkEnabled

public boolean isVlinkEnabled()
                       throws VLinkModeException
This operation is used to check if vlink mode is enabled in SCE.

Specified by:
isVlinkEnabled in interface SCESubscriberApi
Throws:
VLinkModeException

enableVlinkMode

public void enableVlinkMode()
This operation is used to enable the VLink mode Vlink mode should be enabled before the API connects to the SCE.

Specified by:
enableVlinkMode in interface SCESubscriberApi

Cisco Systems Inc. Confidential