FileDocCategorySizeDatePackage
RMDestination.javaAPI DocExample6968Tue May 29 16:56:42 BST 2007com.sun.xml.ws.rm.jaxws.runtime.server

RMDestination

public class RMDestination extends com.sun.xml.ws.rm.jaxws.runtime.RMProvider
An RMDestination represents a Collection of Inbound RMSequences.

Fields Summary
private static RMDestination
rmDestination
private SequenceReaper
reaper
Constructors Summary
private RMDestination()

    
         
    
Methods Summary
public ServerInboundSequencecreateSequence(java.net.URI acksTo, java.lang.String inboundId, java.lang.String outboundId, com.sun.xml.ws.rm.jaxws.runtime.SequenceConfig config)

        
        ServerInboundSequence seq = new ServerInboundSequence(acksTo, inboundId, outboundId, config);
        
        synchronized (this) {
            inboundMap.put(seq.getId(), seq);

            if (inboundMap.size() == 1) {
                reaper.start();
            }
        }
        
        ServerOutboundSequence outbound = 
                (ServerOutboundSequence)seq.getOutboundSequence();
        String id = outbound.getId();
        
        if (id != null) {
            outboundMap.put(id ,  outbound);
        }
        
        
        
        return seq;
    
public static com.sun.xml.ws.rm.jaxws.runtime.server.RMDestinationgetRMDestination()

  
    
        
        return rmDestination;
    
public voidterminateSequence(java.lang.String id)

        ServerInboundSequence seq = getInboundSequence(id);
        
        if (seq == null) {
            throw new InvalidSequenceException(String.format(Constants.UNKNOWN_SEQUENCE_TEXT,id),id);
        }
        
        ServerOutboundSequence out = 
                (ServerOutboundSequence)seq.getOutboundSequence();
        
        synchronized(this) {
            if (seq != null) {
                inboundMap.remove(id);
            }

            if (inboundMap.isEmpty()) {
                reaper.stop();
            }
        }
        
        if (out != null) {
            String outid = out.getId();
            if (outid != null) {
                outboundMap.remove(outid);
            }
        }