Package net.jini.core.lookup

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


     * 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

     * 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

   * Vector).  Used by AppAgent, which provides its own LookupCache
   * of queue services.
   */
  public ServiceItem getServiceItem(int index, LookupCache serviceCache)
  {
    ServiceItem service;
    final int myIndex = index;

    service = serviceCache.lookup(new ServiceItemFilter() {
      public boolean check(ServiceItem svc) {
  return svc.serviceID.equals(getServiceID(myIndex));
View Full Code Here

      queueList = new ArrayList();
      joiners = new ArrayList();
      leaseList = new Vector();
      creatorListener = new ServiceCreatorListener();
      destroyListener = new JobDestroyListener();
      ServiceItem si;
      ServiceTemplate st;
      LookupDiscoveryManager discovery = new
        LookupDiscoveryManager(spaceGroups, locators, null);
      ServiceDiscoveryManager serviceDiscoveryManager = new
        ServiceDiscoveryManager(discovery, null);
View Full Code Here

    queueList = new ArrayList();
    joiners = new ArrayList();
    leaseList = new Vector();
    creatorListener = new ServiceCreatorListener();
    destroyListener = new JobDestroyListener();
    ServiceItem si;
    LookupDiscovery discovery = new
      LookupDiscovery(LookupDiscovery.NO_GROUPS);
    discovery.addGroups(spaceGroups);
    ServiceDiscoveryManager serviceDiscoveryManager = new
      ServiceDiscoveryManager(discovery, null);
View Full Code Here

  public void actionPerformed(ActionEvent e)
  {
    if (e.getActionCommand().equals("Submit")) {
      int index = list.getSelectedIndex();
      if(index > -1) {
        ServiceItem queueItem = browser.getServiceItem(index, serviceCache);
        Entry queueAttrs[] = queueItem.attributeSets;
       
        // Find Name of service (there's got to be an easier way XXX)
        for (int i=0; i<queueAttrs.length; ++i) {
          if (queueAttrs[i] instanceof Name) {
View Full Code Here

  public void mouseClicked(MouseEvent e)
  {
    if(e.getClickCount() > 1) {
      int index = list.getSelectedIndex();
      //Show Compute Monitor
      ServiceItem queueItem = browser.getServiceItem(index, serviceCache);
      Entry queueAttrs[] = queueItem.attributeSets;
      QueueInterface queue = (QueueInterface)queueItem.service;

      // Find Name of service (there's got to be an easier way XXX)
      for (int i=0; i<queueAttrs.length; ++i) {
View Full Code Here

   *
   *
   */
  public void serviceAdded(ServiceDiscoveryEvent e)
  {
    ServiceItem si = e.getPostEventServiceItem();
    ServiceListModel model = (ServiceListModel)queueList.getModel();
    model.addElement(si);
  }
View Full Code Here

   *
   *
   */
  public void serviceRemoved(ServiceDiscoveryEvent e)
  {
    ServiceItem si = e.getPreEventServiceItem();
    ServiceListModel model = (ServiceListModel)queueList.getModel();
    model.removeElement(si);
  }
View Full Code Here

TOP

Related Classes of net.jini.core.lookup.ServiceItem

Copyright © 2018 www.massapicom. 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.