Cisco Systems, Inc.

com.cisco.scabb.servconf.mgmt
Class PrpcClient

java.lang.Object
  extended by com.cisco.scabb.servconf.mgmt.PrpcClient

public class PrpcClient
extends java.lang.Object

PrpcClient is used for sending URL categorization to the SCE in response to URL categorization request RDRs. The following code sample shows how to connect to the SCE and send a category for a URL:

PrpcClient prpcClient = new PrpcClient("10.56.216.34", "admin", "*****"); prpcClient.login(); prpcClient.categorize(1, "www.cnn.com/news.htm", 75); prpcClient.logout();


Constructor Summary
PrpcClient(java.lang.String hostname, java.lang.String username, java.lang.String password)
          Creates a new PrpcClient.
 
Method Summary
 void categorize(int ppcNum, java.lang.String cacheKey, int categoryId)
          Insert the specified cacheKey and categoryId to the URL cache of the specified ppcNum on the SCE.
 void login()
          Connect this PrpcClient to the SCE.
 void logout()
          Disconnect this PrpcClient from the SCE.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrpcClient

public PrpcClient(java.lang.String hostname,
                  java.lang.String username,
                  java.lang.String password)
Creates a new PrpcClient.

Parameters:
hostname - the SCE address
username - the username for SCE authentication
password - the password for SCE authentication
Method Detail

categorize

public void categorize(int ppcNum,
                       java.lang.String cacheKey,
                       int categoryId)
                throws ApplyException
Insert the specified cacheKey and categoryId to the URL cache of the specified ppcNum on the SCE. When using this method to respond to a categorization request RDR, the cacheKey and ppcNum should be taken from the request RDR.

This method blocks until the SCE recieves the categorization message. This method can be invoked from multiple threads to improve performance.

Parameters:
ppcNum - the number of the PPC on the SCE. Valid values for the SCE2000 are 1-3.
cacheKey - the URL to insert, in the format "host:path:parms".
categoryId - the content category for classifying the URL. Special category values to send fault indication to the SCE - TBD.
Throws:
ApplyException - on communication failure or invalid arguments.

login

public void login()
           throws ApplyException
Connect this PrpcClient to the SCE.

Throws:
ApplyException - on communication or authentication failure.

logout

public void logout()
Disconnect this PrpcClient from the SCE.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.