Skip navigation links

Oracle Secure Enterprise Search Java API Reference
10g Release 1 (10.1.8)

B32260-01


oracle.search.admin.ws.client
Class SearchAdminClient

java.lang.Object
  extended byoracle.search.admin.ws.client.SearchAdminClient


public class SearchAdminClient
extends java.lang.Object

A client proxy class that can be used to access the Oracle Secure Enterprise Search admin web service.

The following is one example of the use of SearchAdminClient:

    // Create proxy client to access Oracle SES admin web service.
    SearchAdminClient myPort = new SearchAdminClient();

    // Set the soap URL (web service endpoint)
    myPort.setEndpoint( "http://localhost:7777/search/ws/admin/SearchAdmin" );

    // Need to maintain session cookies
    myPort.setMaintainSession( true );

    // Login and authenticate
    myPort.login( "eqsys", "mypassword" );

    // Get status for the "sample web" schedule
    ScheduleStatus status = myPort.getScheduleStatus( "sample web", "en" );

    // Print out status
    System.out.println( "Status : " + status.getTranslatedStatus() );
    System.out.println( "Error log : " + status.getErrorLog() );

    myPort.logout();
 
See Also:
Schedule, ScheduleStatus

Constructor Summary
SearchAdminClient()
           

 

Method Summary
 java.lang.String getEndpoint()
          Returns the current web service endpoint URL for the proxy class.
 int getEstimatedIndexFragmentation()
          Returns the estimated index fragmentation level, as an integer percentage.
 boolean getMaintainSession()
          Returns whether the session is currently being maintained.
 Schedule[] getSchedules(java.lang.String locale)
          Returns information for all crawler schedules.
 ScheduleStatus getScheduleStatus(java.lang.String name, java.lang.String locale)
          Returns the current status of a crawler schedule.
 void login(java.lang.String username, java.lang.String pwd)
          Authenticates and creates a session.
 void logout()
          Logs out and closes the current session.
 void optimizeIndexNow()
          Optimizes the search index.
 void setEndpoint(java.lang.String endpoint)
          Sets the web service endpoint URL for the proxy class.
 void setMaintainSession(boolean maintainSession)
          Sets a flag to determine whether this Java proxy will maintain its session.
 void startSchedule(java.lang.String name)
          Starts the specified crawler schedule.
 void stopSchedule(java.lang.String name)
          Stops the specified crawler schedule.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SearchAdminClient

public SearchAdminClient()
                  throws java.lang.Exception

Method Detail

getEstimatedIndexFragmentation

public int getEstimatedIndexFragmentation()
                                   throws java.rmi.RemoteException
Returns the estimated index fragmentation level, as an integer percentage.
Returns:
estimated fragmentation as a percentage
Throws:
SoapFaultException - if an error occurs
java.rmi.RemoteException

getScheduleStatus

public ScheduleStatus getScheduleStatus(java.lang.String name,
                                        java.lang.String locale)
                                 throws java.rmi.RemoteException
Returns the current status of a crawler schedule.
Parameters:
name - the name of the crawler schedule
locale - locale used for translated strings in return value
Returns:
the status of the crawler schedule
Throws:
SoapFaultException - if the name is not a valid schedule name, or if another error occurs
java.rmi.RemoteException

getSchedules

public Schedule[] getSchedules(java.lang.String locale)
                        throws java.rmi.RemoteException
Returns information for all crawler schedules.
Parameters:
locale - locale used for translated strings
Returns:
an array of schedule information
Throws:
SoapFaultException - if an error occurs
java.rmi.RemoteException

login

public void login(java.lang.String username,
                  java.lang.String pwd)
           throws java.rmi.RemoteException
Authenticates and creates a session.
Parameters:
username - the administrator username
pwd - the administrator password
Throws:
SoapFaultException - if an error occurs, including if the authentication credentials are incorrect
java.rmi.RemoteException

logout

public void logout()
            throws java.rmi.RemoteException
Logs out and closes the current session.
Throws:
SoapFaultException - if an error occurs
java.rmi.RemoteException

optimizeIndexNow

public void optimizeIndexNow()
                      throws java.rmi.RemoteException
Optimizes the search index.
Throws:
SoapFaultException - if an error occurs
java.rmi.RemoteException

startSchedule

public void startSchedule(java.lang.String name)
                   throws java.rmi.RemoteException
Starts the specified crawler schedule.
Parameters:
name - the name of the crawler schedule
Throws:
SoapFaultException - if the name is not a valid schedule name, or if another error occurs
java.rmi.RemoteException

stopSchedule

public void stopSchedule(java.lang.String name)
                  throws java.rmi.RemoteException
Stops the specified crawler schedule.
Parameters:
name - the name of the crawler schedule
Throws:
SoapFaultException - if the name is not a valid schedule name, or if another error occurs
java.rmi.RemoteException

getEndpoint

public java.lang.String getEndpoint()
Returns the current web service endpoint URL for the proxy class.
Returns:
the web service endpoint address

setEndpoint

public void setEndpoint(java.lang.String endpoint)
Sets the web service endpoint URL for the proxy class.
Parameters:
endpoint - the web service endpoint address

setMaintainSession

public void setMaintainSession(boolean maintainSession)
Sets a flag to determine whether this Java proxy will maintain its session. This is required to be set to true for this proxy class to operate correctly.
Parameters:
maintainSession - true to indicate that this proxy should maintain its session with the server, false otherwise. This should always be set to true.

getMaintainSession

public boolean getMaintainSession()
Returns whether the session is currently being maintained.
Returns:
true if the session is being maintained, false otherwise

Skip navigation links

Oracle Secure Enterprise Search Java API Reference
10g Release 1 (10.1.8)

B32260-01


Copyright © 2006, Oracle. All rights reserved.