Examples of ServiceItem


Examples of com.k42b3.neodym.ServiceItem

  {
    // load available services
    Services services = new Services(http, baseUrl);
    services.discover();

    ServiceItem request = services.getItem("http://oauth.net/core/1.0/endpoint/request");
    ServiceItem authorization = services.getItem("http://oauth.net/core/1.0/endpoint/authorize");
    ServiceItem access = services.getItem("http://oauth.net/core/1.0/endpoint/access");

    if(request == null)
    {
      throw new Exception("Could not find request service");
    }

    if(authorization == null)
    {
      throw new Exception("Could not find authorization service");
    }

    if(access == null)
    {
      throw new Exception("Could not find access service");
    }

    return new OauthProvider(request.getUri(), authorization.getUri(), access.getUri(), consumerKey, consumerSecret);
  }
View Full Code Here

Examples of com.k42b3.neodym.ServiceItem

      // oauth config
      availableServices = new Services(http, Configuration.getInstance().getBaseUrl());
      availableServices.discover();

      ServiceItem request = availableServices.getItem("http://oauth.net/core/1.0/endpoint/request");
      ServiceItem authorization = availableServices.getItem("http://oauth.net/core/1.0/endpoint/authorize");
      ServiceItem access = availableServices.getItem("http://oauth.net/core/1.0/endpoint/access");

      if(request == null)
      {
        throw new Exception("Could not find request service");
      }

      if(authorization == null)
      {
        throw new Exception("Could not find authorization service");
      }

      if(access == null)
      {
        throw new Exception("Could not find access service");
      }

      OauthProvider provider = new OauthProvider(request.getUri(), authorization.getUri(), access.getUri(), Configuration.getInstance().getConsumerKey(), Configuration.getInstance().getConsumerSecret());
      oauth = new Oauth(http, provider);
    }
    catch(Exception e)
    {
      Zubat.handleException(e);
View Full Code Here

Examples of com.k42b3.neodym.ServiceItem

    }
  }

  private void fetchAccount() throws Exception
  {
    ServiceItem item = getAvailableServices().getItem("http://ns.amun-project.org/2011/amun/service/my/verifyCredentials");

    if(item != null)
    {
      account = Account.buildAccount(http.requestXml(Http.GET, item.getUri()));
    }
    else
    {
      throw new Exception("Could not discover user informations");
    }
View Full Code Here

Examples of com.k42b3.neodym.ServiceItem

    http.setOauth(oauth);
  }

  public void onReady() throws Exception
  {
    ServiceItem item = availableServices.getItem("http://ns.amun-project.org/2011/amun/content/page");

    if(item != null)
    {
      loadContainer(item);
View Full Code Here

Examples of com.k42b3.neodym.ServiceItem

    JMenu menu = new JMenu(baseTitle);

    for(int i = 0; i < services.getSize(); i++)
    {
      ServiceItem item = services.getElementAt(i);
      String type = item.getTypeStartsWith(baseUrl);

      if(type != null)
      {
        int deep = this.charCount('/', type);
        String title = type.substring(type.lastIndexOf("/") + 1);
View Full Code Here

Examples of datasoul.serviceitems.ServiceItem

                    first = false;
                }else{
                sb.append(",");
                }
               
                ServiceItem si = (ServiceItem) o;
                sb.append("{");
                sb.append("\n");
                sb.append(si.getJSon());
                sb.append("\n");
                sb.append("}");
                sb.append("\n");
            }
        }
View Full Code Here

Examples of de.dfki.owlsmx.gui.data.ServiceItem

        // Get a TreeSet with the services loaded from TestCollection
        Set services = new TreeSet();
        services = TestCollection.getInstance().getServices();
       
        MatchmakerInterface.getInstance().createMatchmaker();
        ServiceItem service;
        int current = 1;
        // Run through the list of loaded services and add them to the
        // Matchmaker one by one
        for(Iterator iter = services.iterator(); iter.hasNext();current++) {               
            service = (ServiceItem) iter.next();
            // Tell the world what service is load
            System.out.println("MatchmakerInterface: Adding service: " + service.getURI().toString() + ", " + current + "/" + services.size());
            // Load a service to the Matchmaker
            MatchmakerInterface.getInstance().addService(service.getURI());
        }
        System.out.println("Matchmaker: Done Adding services :)");
       
       
        /*
 
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

     * DOCUMENT ME!
     *
     * @param event DOCUMENT ME!
     */
    public void serviceAdded(ServiceDiscoveryEvent event) {
        ServiceItem item = event.getPostEventServiceItem();
        Object service = item.service;
        Hashtable prop = new Hashtable();
        prop.put(JiniDriver.ENTRIES, item.attributeSets);
        prop.put(JiniDriver.SERVICE_ID, item.serviceID.toString());
        Debug.printDebugInfo(10,
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

     * DOCUMENT ME!
     *
     * @param event DOCUMENT ME!
     */
    public void serviceChanged(ServiceDiscoveryEvent event) {
        ServiceItem item = event.getPostEventServiceItem();
        Object service = item.service;
        Hashtable prop = new Hashtable();
        prop.put(JiniDriver.ENTRIES, item.attributeSets);
        prop.put(JiniDriver.SERVICE_ID, item.serviceID.toString());
        Debug.printDebugInfo(10,
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

     * DOCUMENT ME!
     *
     * @param event DOCUMENT ME!
     */
    public void serviceRemoved(ServiceDiscoveryEvent event) {
        ServiceItem item = event.getPreEventServiceItem();
        Object service = item.service;
        Debug.printDebugInfo(10,
            "Unregistering Jini Service in OSGi Framework " +
            item.serviceID.toString());

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.