JSPOCP.

JSPOCP ist ein Java-basierter SPOCP-Client.
Jetzt downloaden

JSPOCP. Ranking & Zusammenfassung

Anzeige

  • Rating:
  • Lizenz:
  • GPL
  • Preis:
  • FREE
  • Name des Herausgebers:
  • Leif Johansson
  • Website des Verlags:
  • http://devel.it.su.se/pub/jsp/polopoly.jsp?d=1026&a=3290

JSPOCP. Stichworte


JSPOCP. Beschreibung

JSPOCP ist ein Java-basierter SPOCP-Client. JSPOCP ist ein Java-basierter SPOCP-Client.Das Projekt (JSPOCP) ist ein Client für SPOCP mit Java. Es ist mit MAVEN2 aus dem MaVen2-Repository verfügbar. Die generierte Dokumentation enthält Javadoc- und Nutzungsbeispiele.JSPOCP-Nutzung Beispiele nach dem Quellcodebeispiel ist vorläufig und testlich.Package org.Spocp.Client; import java.util.list; import org.apache.commons.logging.log; Import org. .apache.commons.logging.Logfactory; / ** * * @Author ALUND * / Public Class-Beispiel {Private Static Final Log Log = logFactory.getlog (SPOCPClient.Class); / ** * * @return Eine Instanz einer Verbindung, die zum Erstellen von Verbindungen zum Erstellen von Verbindungen zu einem SPOCP-Server * / öffentlicher statischer SpoCConnectionFactory ConnectionFactory (String-Host, INT-Anschluss) {SPOCPConnectionFactoryImPLECTORYIMPLEF (); cf.setserver (Host); cf.setport (Port); Rückgabe cf; } / ** * @param args Die Befehlszeilenargumente * / öffentlicher statischer Hohlraum-Main (String-Args []) erbringt Ausnahme von Ausnahme {spocpresult; Ergebnis; String Host = Args ; int port = ganzger.parseite (args ); Spocpconnectionfactory cf = spoCPClient.connectionfactory (Host, Port); SPOCPCONNECTION C = CF.GetConnection (); log.debug (c); // ---- Fügen Sie einige Regeln hinzu ---- result = c.issuecommand (neuer ADDCOMMAND (NULL, "A (B C))"); if (result.getRESULTCODE ()! = spocpreult.spocp_success) system.err.println (result.gettmessage ()); Addcommand addcmd = neue addcommand (); Addcmd.SetPath ("/ Beispiel"); addcmd.setsexpr ("(ABC DEF)"); Ergebnis = c.issuecommand (addcmd); if (result.getRESULTCODE ()! = spocpreult.spocp_success) system.err.println (result.gettmessage ()); Addcmd.SetPath ("/ Anlu0008"); addcmd.setsexpr ("(UB-Buch (SAB p U))"); addcmd.setBoundaryCondition ("null"); addcmd.setreturninfo ("ANLU0008@somedomain.se" .getbytes ()); Ergebnis = c.issuecommand (addcmd); if (result.getRESULTCODE ()! = spocpreult.spocp_success) system.err.println (result.gettmessage ()); addcmd.setpath ("/ jolo0001"); addcmd.setsexpr ("(UB-Buch (SAB p U))"); addcmd.setBoundaryCondition ("null"); addcmd.setreturninfo ("johanna.lofstrom@somedomain.se" .getbytes ()); Ergebnis = c.issuecommand (addcmd); if (result.getRESULTCODE ()! = spocpreult.spocp_success) system.err.println (result.gettmessage ()); // einige Abfragen ergeben Ergebnis = c.issuecommand (neuer Querycommand (null, "(ABC def Ghi)"); if (result.getResultcode () == spocpreult.spocp_denied) system.err.printrintln ("Die Abfrage hat keine Regeln übereinstimmen"); // Eine Abfrage, die ein Multi-Line-Antwort // aufgrund eines Return-Informationsblocks ergibt, der mit // das Matching-Regel Ergebnis = C.issueCommand (neuer QueryCommand (NULL, "UB-Buch (SAB p U)) zugeordnet ist )); if (result.getRESULTCODE () == spocpreult.spocp_success) {list ergebnislist = result.getResultinfolist (); if (Ergebnislist.size () == 1) {spocpresultinfo ri = (spocpresultinfo) resultList.get (0); System.out.println ("Rückgabe von Informationen für die Anpassungsregel:" + neue Zeichenfolge (ri.getbob ())); }} // Listen Sie die Regeln auf, zeigen Sie sie und löschen Sie sie ergeben = c.issuecommand (neue listcommand ()); Listenergebnislist = result.getResultinfolistoList (); if (Ergebnislist! = null) {für (int i = 0; i


JSPOCP. Zugehörige Software

Setilindriver.

Setilindriver-Tool wurde zur Cache-Arbeitseinheit von Seti @ Home-Projekt (http://setiaththome.berkeley.edu) unter Linux vorgenommen. ...

116

Herunterladen