Cisco Systems, Inc.

com.pcube.apps.engage
Class Engage

java.lang.Object
  extended by com.pcube.apps.engage.Engage

public final class Engage
extends java.lang.Object

Engage supplies login and logout functions to the SE. The handle returned by the login serves all of the Policy and Subscriber API functions which directly affect the SE.

See Also:
PolicyAPI

Field Summary
static byte APPLY_FLAG_NO_OVERWRITE
          Applying a Policy or a SubscriberPolicy will not overwrite the parameters of another Policy or SubscriberPolicy, respectively.
static byte APPLY_FLAG_OVERWRITE
          Applying a Policy or a SubscriberPolicy will overwrite any prior values in the PolicyDomain.
static java.lang.String CAPACITY_CONTROL_FUNCTIONALITY
          Deprecated. license system was deprecated
static byte LICENSE_CAPACITY_CONTROL
          Deprecated. license system was deprecated
static byte LICENSE_TIERED_CONTROL
          Deprecated. license system was deprecated
static byte LICENSE_VIEW
          Deprecated. license system was deprecated
static java.lang.String TIERED_CONTROL_FUNCTIONALITY
          Deprecated. license system was deprecated
static java.lang.String VERSION_STRING
          Engage version String.
 
Method Summary
static void activateLicense(java.lang.String user, java.lang.String key)
          Deprecated. license system was deprecated
static void addNotificationListener(NotificationListener listener)
          Subscribs the specific Engage notification listener to recieve notifications regarding all the operations performed by the Engage API.
static void fireErrorNotification(java.lang.String msg)
           
static void fireNotification(Notification notification)
          Used to send a notification to the listeners defined by the function addNotificationListener(NotificationListener)
static void fireNotification(java.lang.String msg)
           
static void fireNotification(java.lang.String msg, java.lang.Object source)
           
static void fireWarningNotification(java.lang.String msg)
           
static void fireWarningNotification(java.lang.String msg, java.lang.Object source)
           
static java.io.InputStream getDefaultProtocolFamilies()
           
static byte getLicenseType()
          Deprecated. license system was deprecated
static java.lang.String getUserHomePcubeFolderName()
          return user home pcube folder name
static boolean isAllowedFullyFunctionalMode()
          Deprecated. license system was deprecated
static boolean isPolicyCompatibleWithLicense(Policy policy)
          Deprecated. Licensing has been deprecated since 3.0.0
static Connection login(com.pcube.management.framework.client.SessionObject sessionObject)
          Connects to a device by using an existing SessionObject.
static Connection login(java.lang.String hostName, java.lang.String userName, java.lang.String password)
          Deprecated. use P-Cube SM API instead
static Connection login(java.lang.String hostName, java.lang.String userName, java.lang.String password, byte deviceType)
          Connects to the P-cube device.
static Connection login(java.lang.String hostName, java.lang.String userName, java.lang.String password, byte deviceType, int prpcPort)
          Connects to the P-cube device.
static void logout(Connection connection)
          Disconnects from the SE.
static void removeNotificationListener(NotificationListener listener)
          Unsubscribes the Engage listener from recieving notifications regarding Engage API operations.
 java.lang.String toString()
          Automatically generated method: toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TIERED_CONTROL_FUNCTIONALITY

public static final java.lang.String TIERED_CONTROL_FUNCTIONALITY
Deprecated. license system was deprecated
Field TIERED_CONTROL_FUNCTIONALITY - changing the domain from active to passive

See Also:
Constant Field Values

CAPACITY_CONTROL_FUNCTIONALITY

public static final java.lang.String CAPACITY_CONTROL_FUNCTIONALITY
Deprecated. license system was deprecated
Field CAPACITY_CONTROL_FUNCTIONALITY - enables active functionality with only one Package

See Also:
Constant Field Values

APPLY_FLAG_NO_OVERWRITE

public static final byte APPLY_FLAG_NO_OVERWRITE
Applying a Policy or a SubscriberPolicy will not overwrite the parameters of another Policy or SubscriberPolicy, respectively.

See Also:
Constant Field Values

APPLY_FLAG_OVERWRITE

public static final byte APPLY_FLAG_OVERWRITE
Applying a Policy or a SubscriberPolicy will overwrite any prior values in the PolicyDomain.

See Also:
Constant Field Values

LICENSE_VIEW

public static final byte LICENSE_VIEW
Deprecated. license system was deprecated
License for viewing only

See Also:
Constant Field Values

LICENSE_CAPACITY_CONTROL

public static final byte LICENSE_CAPACITY_CONTROL
Deprecated. license system was deprecated
License for capacity control

See Also:
Constant Field Values

LICENSE_TIERED_CONTROL

public static final byte LICENSE_TIERED_CONTROL
Deprecated. license system was deprecated
License for tiered access control

See Also:
Constant Field Values

VERSION_STRING

public static final java.lang.String VERSION_STRING
Engage version String.

Method Detail

toString

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

Overrides:
toString in class java.lang.Object

getUserHomePcubeFolderName

public static final java.lang.String getUserHomePcubeFolderName()
return user home pcube folder name

Returns:

login

public static Connection login(java.lang.String hostName,
                               java.lang.String userName,
                               java.lang.String password)
                        throws ConnectionFailedException
Deprecated. use P-Cube SM API instead

Connects to the Engage SM. The function returns a handle which is used by all the API functions which affect the SM. Every login action must be closed with a logout(Connection) action.

Parameters:
hostName - the SM host address
userName - the user name
password - the password
Returns:
the Connection which is a handle passed to all the API functions
Throws:
ConnectionFailedException - if the login failed. The failure reason can be retrieved from the ConnectionFailedException.

login

public static Connection login(java.lang.String hostName,
                               java.lang.String userName,
                               java.lang.String password,
                               byte deviceType)
                        throws ConnectionFailedException
Connects to the P-cube device. The function returns a handle which is used by all the API functions which affect the device.
Use device type Connection.SE_DEVICEto connect to the SE.
Every login action must be closed with a logout(Connection)action.

Parameters:
hostName - the device host address
userName - the user name
password - the password
deviceType - the device type
Returns:
the Connection which is a handle passed to all the API functions
Throws:
ConnectionFailedException - if the login failed. The failure reason can be retrieved from the ConnectionFailedException.

login

public static Connection login(java.lang.String hostName,
                               java.lang.String userName,
                               java.lang.String password,
                               byte deviceType,
                               int prpcPort)
                        throws ConnectionFailedException
Connects to the P-cube device. The function returns a handle which is used by all the API functions which affect the device.
Use device type Connection.SE_DEVICEto connect to the SE.
Every login action must be closed with a logout(Connection)action.

Parameters:
hostName - the device host address
userName - the user name
password - the password
prpcPort - the PRPC Port
deviceType - the device type
Returns:
the Connection which is a handle passed to all the API functions
Throws:
ConnectionFailedException - if the login failed. The failure reason can be retrieved from the ConnectionFailedException.

login

public static Connection login(com.pcube.management.framework.client.SessionObject sessionObject)
Connects to a device by using an existing SessionObject. The function returns a handle which is used by all the API functions which affect the device. Every login action must be closed with a logout(Connection)action.

Parameters:
sessionObject - the SessionObject to the Engage device
Returns:
the Connection which is a handle passed to all the API functions

logout

public static void logout(Connection connection)
Disconnects from the SE. The Connection is no longer useful after this function is called.

Parameters:
connection - the Connection which keeps a handle to the connection to the SE

activateLicense

public static void activateLicense(java.lang.String user,
                                   java.lang.String key)
Deprecated. license system was deprecated

Sets the Engage API client to be an active one, that is, enabling the client to change the Engage system to have licensed abilities. Notice that the active mode is an atribute of the client and not of the Policy. For a unique registration key please contact your P-Cube representative.

Parameters:
user - the user name
key - the user's unique key
Throws:
java.lang.IllegalArgumentException - if the registration key is invalid

getLicenseType

public static byte getLicenseType()
Deprecated. license system was deprecated

Returns the license type

Returns:
See Also:
LICENSE_VIEW, LICENSE_CAPACITY_CONTROL, LICENSE_TIERED_CONTROL

addNotificationListener

public static void addNotificationListener(NotificationListener listener)
Subscribs the specific Engage notification listener to recieve notifications regarding all the operations performed by the Engage API. The listener must implement the NotificationListener interface.

Parameters:
listener - the NotificationListener

removeNotificationListener

public static void removeNotificationListener(NotificationListener listener)
Unsubscribes the Engage listener from recieving notifications regarding Engage API operations. The removed listener will not recieve any more notifications.

Parameters:
listener - the NotificationListener to be removed
Throws:
java.lang.IllegalArgumentException - if the listener was never subscribed to listen to Engage notifictions

fireNotification

public static void fireNotification(Notification notification)
Used to send a notification to the listeners defined by the function addNotificationListener(NotificationListener)

Parameters:
notification - the notification to be sent

isPolicyCompatibleWithLicense

public static boolean isPolicyCompatibleWithLicense(Policy policy)
Deprecated. Licensing has been deprecated since 3.0.0

Checks if a given Policy can be handled by the the current license

Parameters:
policy -
Returns:
true or false

isAllowedFullyFunctionalMode

public static boolean isAllowedFullyFunctionalMode()
Deprecated. license system was deprecated

Checks if the license allowed working in fully-functional system mode.

Returns:
true if the license allows fully-functional mode

fireNotification

public static void fireNotification(java.lang.String msg,
                                    java.lang.Object source)
Parameters:
msg -
source -

fireWarningNotification

public static void fireWarningNotification(java.lang.String msg,
                                           java.lang.Object source)

getDefaultProtocolFamilies

public static java.io.InputStream getDefaultProtocolFamilies()

fireNotification

public static void fireNotification(java.lang.String msg)

fireWarningNotification

public static void fireWarningNotification(java.lang.String msg)

fireErrorNotification

public static void fireErrorNotification(java.lang.String msg)

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.