Java Doc for VirtualHost.java in  » Web-Services » restlet-1.0.8 » org » restlet » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Services » restlet 1.0.8 » org.restlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.restlet.Uniform
      org.restlet.Restlet
         org.restlet.Router
            org.restlet.VirtualHost

VirtualHost
public class VirtualHost extends Router (Code)
Router of calls from Server connectors to Restlets. The attached Restlets are typically Applications.

A virtual host is defined along three properties:
  • request's Request.getHostRef : the URI of the host that received the request. Note that the same IP address can correspond to multiple domain names and therefore receive request with different "hostRef" URIs.
  • request's Request.getResourceRef : the URI of the target resource of the request. If this reference is relative, then it is based on the "hostRef", otherwise it is maintained as received. This difference is useful for resources identified by URNs or for Web proxies or Web caches.
  • response's Response.getServerInfo : the information about the server connector receiving the requests such as it IP address and port number.
When creating a new instance, you can define Java regular expressions ( java.util.regex.Pattern ) that must match the domain name, port, scheme for references or IP address and port number for server information. The default values match everything.
See Also:   java.util.regex.Pattern
See Also:    Wikipedia - * Virtual Hosting
See Also:    Apache - Virtual * Hosting
author:
   Jerome Louvel (contact@noelios.com)



Constructor Summary
public  VirtualHost()
     Constructor.
public  VirtualHost(Context context)
     Constructor.
public  VirtualHost(Context context, String hostDomain, String hostPort, String hostScheme, String resourceDomain, String resourcePort, String resourceScheme, String serverAddress, String serverPort)
     Constructor.

Method Summary
protected  RoutecreateRoute(String uriPattern, Restlet target)
    
public  StringgetHostDomain()
     Returns the hostRef host domain to match.
public  StringgetHostPort()
     Returns the hostRef host port to match.
public  StringgetHostScheme()
     Returns the hostRef scheme to match.
public static  StringgetIpAddress(String domain)
     Returns the IP address of a given domain name.
Parameters:
  domain - The domain name.
public static  StringgetLocalHostAddress()
     Returns the local host IP address.
public static  StringgetLocalHostName()
     Returns the local host name.
public  StringgetName()
     Returns the display name.
public  StringgetResourceDomain()
     Returns the resourceRef host domain to match.
public  StringgetResourcePort()
     Returns the resourceRef host port to match.
public  StringgetResourceScheme()
     Returns the resourceRef scheme to match.
public  StringgetServerAddress()
     Returns the listening server address.
public  StringgetServerPort()
     Returns the listening server port.
public  voidsetHostDomain(String hostDomain)
     Sets the hostRef host domain to match.
public  voidsetHostPort(String hostPort)
     Sets the hostRef host port to match.
public  voidsetHostScheme(String hostScheme)
     Sets the hostRef scheme to match.
public  voidsetName(String name)
     Sets the display name.
public  voidsetResourceDomain(String resourceDomain)
     Sets the resourceRef host domain to match.
public  voidsetResourcePort(String resourcePort)
     Sets the resourceRef host port to match.
public  voidsetResourceScheme(String resourceScheme)
     Sets the resourceRef scheme to match.
public  voidsetServerAddress(String serverAddress)
     Sets the listening server address.
public  voidsetServerPort(String serverPort)
     Sets the listening server port.


Constructor Detail
VirtualHost
public VirtualHost()(Code)
Constructor. Note that usage of this constructor is not recommended as the Router won't have a proper context set. In general you will prefer to use the other constructor and pass it the parent component's context.



VirtualHost
public VirtualHost(Context context)(Code)
Constructor. Accepts all incoming requests by default, use the set methods to restrict the matchable patterns.
Parameters:
  context - The context.



VirtualHost
public VirtualHost(Context context, String hostDomain, String hostPort, String hostScheme, String resourceDomain, String resourcePort, String resourceScheme, String serverAddress, String serverPort)(Code)
Constructor.
Parameters:
  context - The context.
Parameters:
  hostDomain - The hostRef host domain pattern to match.
Parameters:
  hostPort - The hostRef host port pattern to match.
Parameters:
  hostScheme - The hostRef scheme protocol pattern to match.
Parameters:
  resourceDomain - The resourceRef host domain pattern to match.
Parameters:
  resourcePort - The resourceRef host port pattern to match.
Parameters:
  resourceScheme - The resourceRef scheme protocol pattern to match.
Parameters:
  serverAddress - The listening server address pattern to match.
Parameters:
  serverPort - The listening server port pattern to match.




Method Detail
createRoute
protected Route createRoute(String uriPattern, Restlet target)(Code)



getHostDomain
public String getHostDomain()(Code)
Returns the hostRef host domain to match. Uses patterns in java.util.regex. The hostRef host domain to match.



getHostPort
public String getHostPort()(Code)
Returns the hostRef host port to match. Uses patterns in java.util.regex. The hostRef host port to match.



getHostScheme
public String getHostScheme()(Code)
Returns the hostRef scheme to match. Uses patterns in java.util.regex. The hostRef scheme to match.



getIpAddress
public static String getIpAddress(String domain)(Code)
Returns the IP address of a given domain name.
Parameters:
  domain - The domain name. The IP address.



getLocalHostAddress
public static String getLocalHostAddress()(Code)
Returns the local host IP address. The local host IP address.



getLocalHostName
public static String getLocalHostName()(Code)
Returns the local host name. The local host name.



getName
public String getName()(Code)
Returns the display name. The display name.



getResourceDomain
public String getResourceDomain()(Code)
Returns the resourceRef host domain to match. Uses patterns in java.util.regex. The resourceRef host domain to match.



getResourcePort
public String getResourcePort()(Code)
Returns the resourceRef host port to match. Uses patterns in java.util.regex. The resourceRef host port to match.



getResourceScheme
public String getResourceScheme()(Code)
Returns the resourceRef scheme to match. Uses patterns in java.util.regex. The resourceRef scheme to match.



getServerAddress
public String getServerAddress()(Code)
Returns the listening server address. Uses patterns in java.util.regex. The listening server address.



getServerPort
public String getServerPort()(Code)
Returns the listening server port. Uses patterns in java.util.regex. The listening server port.



setHostDomain
public void setHostDomain(String hostDomain)(Code)
Sets the hostRef host domain to match. Uses patterns in java.util.regex.
Parameters:
  hostDomain - The hostRef host domain to match.



setHostPort
public void setHostPort(String hostPort)(Code)
Sets the hostRef host port to match. Uses patterns in java.util.regex.
Parameters:
  hostPort - The hostRef host port to match.



setHostScheme
public void setHostScheme(String hostScheme)(Code)
Sets the hostRef scheme to match. Uses patterns in java.util.regex.
Parameters:
  hostScheme - The hostRef scheme to match.



setName
public void setName(String name)(Code)
Sets the display name.
Parameters:
  name - The display name.



setResourceDomain
public void setResourceDomain(String resourceDomain)(Code)
Sets the resourceRef host domain to match. Uses patterns in java.util.regex.
Parameters:
  resourceDomain - The resourceRef host domain to match.



setResourcePort
public void setResourcePort(String resourcePort)(Code)
Sets the resourceRef host port to match. Uses patterns in java.util.regex.
Parameters:
  resourcePort - The resourceRef host port to match.



setResourceScheme
public void setResourceScheme(String resourceScheme)(Code)
Sets the resourceRef scheme to match. Uses patterns in java.util.regex.
Parameters:
  resourceScheme - The resourceRef scheme to match.



setServerAddress
public void setServerAddress(String serverAddress)(Code)
Sets the listening server address. Uses patterns in java.util.regex.
Parameters:
  serverAddress - The listening server address.



setServerPort
public void setServerPort(String serverPort)(Code)
Sets the listening server port. Uses patterns in java.util.regex.
Parameters:
  serverPort - The listening server port.



Fields inherited from org.restlet.Router
final public static int BEST(Code)(Java Doc)
final public static int CUSTOM(Code)(Java Doc)
final public static int FIRST(Code)(Java Doc)
final public static int LAST(Code)(Java Doc)
final public static int NEXT(Code)(Java Doc)
final public static int RANDOM(Code)(Java Doc)

Methods inherited from org.restlet.Router
public Route attach(Restlet target)(Code)(Java Doc)
public Route attach(String uriPattern, Class<? extends Resource> targetClass)(Code)(Java Doc)
public Route attach(String uriPattern, Restlet target)(Code)(Java Doc)
public Route attachDefault(Class<? extends Resource> defaultTargetClass)(Code)(Java Doc)
public Route attachDefault(Restlet defaultTarget)(Code)(Java Doc)
protected Route createRoute(String uriPattern, Restlet target)(Code)(Java Doc)
public void detach(Restlet target)(Code)(Java Doc)
protected Route getCustom(Request request, Response response)(Code)(Java Doc)
public Route getDefaultRoute()(Code)(Java Doc)
public Class<? extends Finder> getFinderClass()(Code)(Java Doc)
public int getMaxAttempts()(Code)(Java Doc)
public Restlet getNext(Request request, Response response)(Code)(Java Doc)
public float getRequiredScore()(Code)(Java Doc)
public long getRetryDelay()(Code)(Java Doc)
public RouteList getRoutes()(Code)(Java Doc)
public int getRoutingMode()(Code)(Java Doc)
public void handle(Request request, Response response)(Code)(Java Doc)
public void setDefaultRoute(Route defaultRoute)(Code)(Java Doc)
public void setFinderClass(Class<? extends Finder> finderClass)(Code)(Java Doc)
public void setMaxAttempts(int maxAttempts)(Code)(Java Doc)
public void setRequiredScore(float score)(Code)(Java Doc)
public void setRetryDelay(long retryDelay)(Code)(Java Doc)
public void setRoutingMode(int routingMode)(Code)(Java Doc)

Methods inherited from org.restlet.Restlet
public Context getContext()(Code)(Java Doc)
public Logger getLogger()(Code)(Java Doc)
public void handle(Request request, Response response)(Code)(Java Doc)
protected synchronized void init(Request request, Response response)(Code)(Java Doc)
public synchronized boolean isStarted()(Code)(Java Doc)
public synchronized boolean isStopped()(Code)(Java Doc)
public void setContext(Context context)(Code)(Java Doc)
public synchronized void start() throws Exception(Code)(Java Doc)
public synchronized void stop() throws Exception(Code)(Java Doc)

Methods inherited from org.restlet.Uniform
final public Response delete(String resourceUri)(Code)(Java Doc)
final public Response delete(Reference resourceRef)(Code)(Java Doc)
final public Response get(String resourceUri)(Code)(Java Doc)
final public Response get(Reference resourceRef)(Code)(Java Doc)
final public Response handle(Request request)(Code)(Java Doc)
abstract public void handle(Request request, Response response)(Code)(Java Doc)
final public Response head(String resourceUri)(Code)(Java Doc)
final public Response head(Reference resourceRef)(Code)(Java Doc)
final public Response options(String resourceUri)(Code)(Java Doc)
final public Response options(Reference resourceRef)(Code)(Java Doc)
final public Response post(String resourceUri, Representation entity)(Code)(Java Doc)
final public Response post(Reference resourceRef, Representation entity)(Code)(Java Doc)
final public Response put(String resourceUri, Representation entity)(Code)(Java Doc)
final public Response put(Reference resourceRef, Representation entity)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.