Package org.apache.muse.ws.resource

Examples of org.apache.muse.ws.resource.WsResource


                               Element content,
                               Date termination)
        throws AddRefusedFault,
               BaseFault
    {
        WsResource entry = createEntry(memberEPR, content, termination);
        return addEntry(memberEPR, entry);
    }
View Full Code Here


        //
       
        if (epr == null)
            throw new NullPointerException(_MESSAGES.get("NullMemberServiceEPR"));
       
        WsResource sg = getWsResource();
       
        //
        // make sure this is a valid member of the group
        //
        if (!isMatch(epr))
            throw new AddRefusedFault(_MESSAGES.get("ContentCreationFailed"));

        ResourceManager manager = sg.getResourceManager();
        String endpoint = getEntryContextPath();
        WsResource resource = null;
       
        try
        {
            resource = (WsResource)manager.createResource(endpoint);
        }
       
        catch (SoapFault error)
        {
            throw new ResourceInitializationFault(error);
        }
       
        //
        // set the sg entry fields before initializing the entry resource
        //
       
        Entry entry = (Entry)resource.getCapability(WssgConstants.ENTRY_URI);
       
        entry.setServiceGroup(sg);
        entry.setMemberEPR(epr);
       
        try
        {
            resource.initialize();
            manager.addResource(resource.getEndpointReference(), resource);
        }
       
        catch (SoapFault error)
        {
            throw new ResourceInitializationFault(error);
        }
       
        //
        // set termination time AFTER we initialize so that we can rely
        // on the base Resource class' implementation of WS-RL (which
        // tries to apply the change immediately, rather than storing it
        // in a field and setting it during initialization)
        //
        if (resource.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
        {
            ScheduledTermination wsrl =
                (ScheduledTermination)resource.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
            wsrl.setTerminationTime(termination);
        }
       
        return resource;
    }
View Full Code Here

       
        //
        // make sure the Entry endpoint is exposed, since our entries
        // are all first-class resources
        //
        WsResource resource = getWsResource();
        ResourceManager manager = resource.getResourceManager();
       
        _entryPath = manager.getResourceContextPath(Entry.class);
       
        if (_entryPath == null)
            throw new RuntimeException(_MESSAGES.get("NoEntryEndpoint"));
View Full Code Here

        EndpointReference memberEPR = null;
       
        while (i.hasNext() && memberEPR == null)
        {
            EndpointReference nextEPR = (EndpointReference)i.next();
            WsResource nextEntry = (WsResource)_entriesByMemberEPR.get(nextEPR);
           
            if (entry == nextEntry)
                memberEPR = nextEPR;
        }
       
View Full Code Here

            ScheduledTermination wsrl =
                (ScheduledTermination)resource.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
            termination = wsrl.getTerminationTime();
        }
       
        WsResource entry = addEntry(epr, null, termination);
       
        //
        // if we're using persistence, create a record of the entry
        //
        ServiceGroupPersistence persistence = (ServiceGroupPersistence)getPersistence();
       
        try
        {
            if (persistence != null)
                persistence.resourceAdded(entry.getEndpointReference(), entry);
        }
       
        catch (SoapFault fault)
        {
            throw new AddRefusedFault(fault);
View Full Code Here

        if (hasBeenShutdown())
            getWsResource().getResourceManager().removeListener(this);
       
        else
        {
            WsResource entry = getEntry(epr);
           
            //
            // if there was no value in the SG for the EPR, it was
            // either a wssg:Entry resource (entries do not have
            // entries themselves, or we'd have infinite recursion)
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.resource.WsResource

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.