com.sun.xml.ws.transport.local
Class InVmServer

java.lang.Object
  extended by com.sun.xml.ws.transport.local.InVmServer

public final class InVmServer
extends Object

In-VM transport.

This transport lets you deploy services in a servlet-like environment within the same VM. Unlike the local transport, which deploys a new server instance every time a new transport tube is created, in-VM transport maintains a server instance outside the transport, allowing multiple clients to talk to the same in-VM service instance.

For this reason, in-VM transport requires explicit "deploy" and "undeploy" operations.


Constructor Summary
InVmServer(File explodedWarDir)
           
InVmServer(String id, File explodedWarDir)
          Deploys a new server instance.
InVmServer(String id, List<WSEndpoint> endpoints)
           
 
Method Summary
static InVmServer get(String id)
          Obtains the running instance from the ID, or returns null if not found.
(package private)  URI getAddress()
          Returns the URI that identifies this server.
(package private)  WSEndpoint getByPortName(String portLocalName)
          Finds the WSEndpoint that matches the given port name.
(package private)  List<WSEndpoint> getEndpoints()
          Gets all the WSEndpoints.
 String toString()
           
 void undeploy()
          Gracefully terminates this service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InVmServer

public InVmServer(@NotNull
                  String id,
                  File explodedWarDir)
           throws IOException
Deploys a new server instance.

Parameters:
id - Every server instance needs to have an unique ID. If you want to set the ID by yourself, use this version. Otherwise use the single argument version.
explodedWarDir - The exploded war file image in the file system, where services are loaded from.
Throws:
IOException

InVmServer

public InVmServer(@NotNull
                  String id,
                  List<WSEndpoint> endpoints)
           throws IOException
Throws:
IOException

InVmServer

public InVmServer(File explodedWarDir)
           throws IOException
Throws:
IOException
Method Detail

getByPortName

@Nullable
WSEndpoint getByPortName(String portLocalName)
Finds the WSEndpoint that matches the given port name.


getEndpoints

List<WSEndpoint> getEndpoints()
Gets all the WSEndpoints.


getAddress

URI getAddress()
Returns the URI that identifies this server. Use this as the endpoint address of the JAX-WS RI to talk to services in this server


undeploy

public void undeploy()
Gracefully terminates this service. You can also just let it garbage collected without calling this method, but that would shut down the service without proper termination required by the JAX-WS specification.


get

@Nullable
public static InVmServer get(String id)
Obtains the running instance from the ID, or returns null if not found.


toString

public String toString()
Overrides:
toString in class Object