|
Oracle Secure Enterprise Search Java API Reference 11g Release 1 (11.1.2.2.0) E21607-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.search.admin.ws.client.SearchAdminClient
public class SearchAdminClient
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();
2009-11 Converted OC4J based JAXRPC client to WLS JAXRPC client. This class serves as the wrapping class of the converted WS client. Certain datatype conversion and exception handling conversion were needed to conform to the published API interfaces.
Schedule
, ScheduleStatus
Constructor Summary | |
---|---|
SearchAdminClient() |
Method Summary | |
---|---|
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(String locale) Returns information for all crawler schedules. |
ScheduleStatus |
getScheduleStatus(String name, String locale) Returns the current status of a crawler schedule. |
void |
login(String username, String pwd) Authenticates and creates a session. |
void |
logout() Logs out and closes the current session. |
void |
optimizeIndexNow() Optimizes the search index. |
void |
setEndpoint(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(String name) Starts the specified crawler schedule. |
void |
stopSchedule(String name) Stops the specified crawler schedule. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchAdminClient() throws Exception
Exception
Method Detail |
---|
public int getEstimatedIndexFragmentation() throws RemoteException
SoapFaultException
- if an error occursRemoteException
public ScheduleStatus getScheduleStatus(String name, String locale) throws RemoteException
name
- the name of the crawler schedulelocale
- locale used for translated strings in return valueSoapFaultException
- if the name is not a valid schedule name, or if another error occursRemoteException
public Schedule[] getSchedules(String locale) throws RemoteException
locale
- locale used for translated stringsSoapFaultException
- if an error occursRemoteException
public void login(String username, String pwd) throws RemoteException
username
- the administrator usernamepwd
- the administrator passwordSoapFaultException
- if an error occurs, including if the authentication credentials are incorrectRemoteException
public void logout() throws RemoteException
SoapFaultException
- if an error occursRemoteException
public void optimizeIndexNow() throws RemoteException
SoapFaultException
- if an error occursRemoteException
public void startSchedule(String name) throws RemoteException
name
- the name of the crawler scheduleSoapFaultException
- if the name is not a valid schedule name, or if another error occursRemoteException
public void stopSchedule(String name) throws RemoteException
name
- the name of the crawler scheduleSoapFaultException
- if the name is not a valid schedule name, or if another error occursRemoteException
public String getEndpoint()
public void setEndpoint(String endpoint)
endpoint
- the web service endpoint addresspublic void setMaintainSession(boolean maintainSession)
true
for this proxy class to operate correctly.maintainSession
- true to indicate that this proxy should maintain its session with the server, false otherwise. This should always be set to true.public boolean getMaintainSession()
|
Oracle Secure Enterprise Search Java API Reference 11g Release 1 (11.1.2.2.0) E21607-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |