100% found this document useful (1 vote)
11 views

Pro RESTful APIs with Micronaut: Build Java-Based Microservices with REST, JSON, and XML 2 / converted Edition Sanjay Patni pdf download

The document promotes the book 'Pro RESTful APIs with Micronaut' by Sanjay Patni, which focuses on building Java-based microservices using REST, JSON, and XML. It covers essential concepts such as data exchange mechanisms, API design, and best practices, specifically targeting software developers and data professionals. The book includes hands-on exercises and supplementary materials available on GitHub to enhance learning and application of the concepts discussed.

Uploaded by

josolkolbet
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
11 views

Pro RESTful APIs with Micronaut: Build Java-Based Microservices with REST, JSON, and XML 2 / converted Edition Sanjay Patni pdf download

The document promotes the book 'Pro RESTful APIs with Micronaut' by Sanjay Patni, which focuses on building Java-based microservices using REST, JSON, and XML. It covers essential concepts such as data exchange mechanisms, API design, and best practices, specifically targeting software developers and data professionals. The book includes hands-on exercises and supplementary materials available on GitHub to enhance learning and application of the concepts discussed.

Uploaded by

josolkolbet
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

Download the full version and explore a variety of ebooks

or textbooks at https://ebookmass.com

Pro RESTful APIs with Micronaut: Build Java-Based


Microservices with REST, JSON, and XML 2 /
converted Edition Sanjay Patni

_____ Tap the link below to start your download _____

https://ebookmass.com/product/pro-restful-apis-with-
micronaut-build-java-based-microservices-with-rest-json-and-
xml-2-converted-edition-sanjay-patni/

Find ebooks or textbooks at ebookmass.com today!


Here are some recommended products for you. Click the link to
download, or explore more at ebookmass.com

Pro RESTful APIs with Micronaut: Build Java-Based


Microservices with REST, JSON, and XML, 2nd Edition Sanjay
Patni
https://ebookmass.com/product/pro-restful-apis-with-micronaut-build-
java-based-microservices-with-rest-json-and-xml-2nd-edition-sanjay-
patni/

Coding Clean, Reliable, and Safe REST APIs with ASP.NET


Core 8: Develop Robust Minimal APIs with .NET 8 Anthony
Giretti
https://ebookmass.com/product/coding-clean-reliable-and-safe-rest-
apis-with-asp-net-core-8-develop-robust-minimal-apis-with-
net-8-anthony-giretti/

Learn Microservices with Spring Boot 3 3rd / converted


Edition Moises Macero Garcia

https://ebookmass.com/product/learn-microservices-with-spring-
boot-3-3rd-converted-edition-moises-macero-garcia/

Coding Clean, Reliable, and Safe REST APIs with ASP.NET


Core 8 1st Edition Anthony Giretti

https://ebookmass.com/product/coding-clean-reliable-and-safe-rest-
apis-with-asp-net-core-8-1st-edition-anthony-giretti/
Beginning Cloud Native Development with MicroProfile,
Jakarta EE, and Kubernetes: Java DevOps for Building and
Deploying Microservices-based Applications 1st Edition
Tarun Telang
https://ebookmass.com/product/beginning-cloud-native-development-with-
microprofile-jakarta-ee-and-kubernetes-java-devops-for-building-and-
deploying-microservices-based-applications-1st-edition-tarun-telang/

Data Engineering with AWS: Acquire the skills to design


and build AWS-based data transformation pipelines like a
pro 2nd Edition Eagar
https://ebookmass.com/product/data-engineering-with-aws-acquire-the-
skills-to-design-and-build-aws-based-data-transformation-pipelines-
like-a-pro-2nd-edition-eagar/

Beginning Spring Boot 3: Build Dynamic Cloud-Native Java


Applications and Microservices - Second Edition K. Siva
Prasad Reddy
https://ebookmass.com/product/beginning-spring-boot-3-build-dynamic-
cloud-native-java-applications-and-microservices-second-edition-k-
siva-prasad-reddy/

Postman for API Testing: A Beginner's Guide: Learn to test


APIs like a pro with Postman with Real-World Examples and
Step-by-Step Guidance Parvin
https://ebookmass.com/product/postman-for-api-testing-a-beginners-
guide-learn-to-test-apis-like-a-pro-with-postman-with-real-world-
examples-and-step-by-step-guidance-parvin/

Learning Java: Beginning programming with java for dummies


Bach

https://ebookmass.com/product/learning-java-beginning-programming-
with-java-for-dummies-bach/
Sanjay Patni

Pro RESTful APIs with Micronaut


Build Java-Based Microservices with REST,
JSON, and XML
2nd ed.
Sanjay Patni
Santa Clara, CA, USA

ISBN 978-1-4842-9199-3 e-ISBN 978-1-4842-9200-6


https://doi.org/10.1007/978-1-4842-9200-6

© Sanjay Patni 2017, 2023

This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors, and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress


Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
I would like to thank everyone at Apress who I’ve worked closely with.
Thanks to the reviewers; their in-depth reviews helped the quality of the
book. A heartfelt thanks goes to my wife, Veena, for her tireless and
unconditional support that helped me work on this book. A huge thanks
goes to my father, Ajit Kumar Patni, and my mother, Late Basantidevi, for
their selfless support that helped me reach where I am today.
Introduction
Databases, websites, and business applications need to exchange data.
This is accomplished by defining standard data formats such as
Extensible Markup Language (XML) or JavaScript Object Notation
(JSON), as well as transfer protocols or web services such as the Simple
Object Access Protocol (SOAP) or the more popular Representational
State Transfer (REST). Developers often have to design their own
Application Programming Interfaces (APIs) to make applications work
while integrating specific business logic around operating systems or
servers. This book introduces these concepts with a focus on the
RESTful APIs.
This book introduces the data exchange mechanism and common
data formats. For web exchange, you will learn the HTTP protocol,
including how to use XML. This book compares SOAP and REST and
then covers the concepts of stateless transfer. It introduces software
API design and best design practices. The second half of the book
focuses on RESTful APIs design and implementations that follow the
Micronaut and Java API for RESTful Web Services. You will learn how to
build and consume Micronaut services using JSON and XML and
integrate RESTful APIs with different data sources like relational
databases and NoSQL databases through hands-on exercises. You will
apply these best practices to complete a design review of publicly
available APIs with a small-scale software system in order to design
and implement RESTful APIs.
This book is intended for software developers who use data in
projects. It is also useful for data professionals who need to understand
the methods of data exchange and how to interact with business
applications. Java programming experience is required for the
exercises.
Topics include
Data exchange and web services
SOAP vs. REST, state vs. stateless
XML vs. JSON
Introduction to API design: REST and Micronaut
API design practices
Designing RESTful APIs
Building RESTful APIs
Interacting with RDBMS (MySQL)
Consuming RESTful APIs (i.e., JSON, XML)
Any source code or other supplementary material referenced by the
author in this book is available to readers on the Github repository:
https://github.com/Apress/Pro-RESTful-APIs-with-Micronaut. For
more detailed information, please visit
http://www.apress.com/source-code.
Table of Contents
Chapter 1:​Fundamentals of RESTful APIs
Abstract
SOAP vs.​REST
Web Architectural Style
Client-Server
Uniform Resource Interface
Layered System
Caching
Stateless
Code on Demand
HATEOAS
What Is REST?​
REST Basics
REST Fundamentals
Summary
Chapter 2:​Micronaut
Abstract
Comparison of Micronaut with Spring Boot
Ease of Installation
Natively Cloud Enabled
Serverless Functions
Application Configuration
Messaging System Support
Security
Caching
Management and Monitoring
API Portfolio
Online Flight
Message
Software
Micronaut
JDK 11
POSTMAN
CURL
IDE
Maven
Setting Up an IDE
Configuring Visual Studio Code
Summary
Chapter 3:​Introduction:​XML and JSON
Abstract
What Is XML?​
XML Comments
Why Is XML Important?​
How Can You Use XML?​
Pros and Cons of XML
What Is JSON?​
JSON Syntax
Why Is JSON Important?​
How Can You Use JSON?​
Pros and Cons of JSON
XML and JSON Comparison
Implementing APIs to Return XML and JSON Messages
Summary
Chapter 4:​API Design and Modeling
Abstract
API Design Strategies
API Creation Process and Methodology
Process
API Methodology
Domain Analysis or API Description
Architecture Design
Prototyping
Implementation
Publish
API Modeling
Comparison of API Modeling
In summary
Best Practices
Keep Your Base URL Simple and Intuitive
Error Handling
Error Code
Versioning
Partial Response
Pagination
Multiple Formats
API Façade
API Solution Architecture
Mobile Solutions
Cloud Solutions
Web Solutions
Integration Solutions
Multichannel Solutions
Smart TV Solutions
Internet of Things
Stakeholders in API Solutions
API Providers
API Consumers
End Users
API Modeling
Summary
Chapter 5:​API Portfolio and Framework
Abstract
API Portfolio Architecture
Requirements
Consistency
Reuse
Customization
Discoverability
Longevity
How Do We Enforce These Requirements—Governance?​
Consistency
Reuse
Customization
Discoverability
Change Management
API Framework
Process APIs:​Services Layer
System APIs:​Data Access Object
Experience APIs:​API Façade
Services Layer Implementation
Summary
Chapter 6:​API Platform and Data Handler
Abstract
API Platform Architecture
Why Do We Need an API Platform?​
So What Is an API Platform?​
So Which Capabilities Does the API Platform Have?​
API Development Platform
API Runtime Platform
API Engagement Platform
How Is an API Platform Organized?​What Is the Architecture of
the API Platform?​
How Does the API Architecture Fit in the Surrounding Technical
Architecture of an Enterprise?​
Data Handler
Data Access Object
Command Query Responsibility Segregation (CQRS)
SQL Development Process
NoSQL Process
Do I Have to Choose Between SQL and NoSQL?​
Why a Single REST API?​
Summary
Chapter 7:​API Management and CORS
Abstract
Façade
Façade Pattern
API Façade
API Management
API Life Cycle
API Retirement
API Monetization
Cross-Origin Resource Sharing (CORS)
Summary
Index
About the Author
Sanjay Patni
is a results-focused technologist with
extensive experience in aligning
innovative technology solutions with
business needs to optimize manual steps
in the business processes and improving
operational efficiency.
At Oracle, he has worked with the
Fusion Apps Product development team,
where he has identified opportunities for
automation of programs related to
Fusion Apps codeline management. This
involved delivery of GA releases for
patching, as well as codelines for
ongoing demo, development, and testing. He conceptualized and
developed self-service UX for codeline requests and auditing, reducing
manual steps by 80%. He also rolled out 12 sprints of codeline creation,
automating about 100+ manual steps involving integration with other
subsystems using technologies like automation workflow and RESTful
APIs.
Prior to joining Oracle, he spent 15+ years in the software industry,
defining and delivering key initiatives across different industry sectors.
His responsibilities included innovation, requirement, analysis,
technical architecture, design, and agile software development of web-
based enterprise products and solutions. He pioneered innovative
usage of Java in building business applications and received an award
from Sun Microsystems. This helped improve feedback for Java APIs for
Enterprise in building business application software using Java. He has
diverse experience in Application Architecture to include UX,
Distributed Systems, Cloud and DevOps.
He has worked as a visiting technical instructor or mentor and
conducted classes or training on RESTful APIs design and integration.
He has a strong educational background in computer science with a
master’s from IIT, Roorkee, India.
About the Technical Reviewer
Massimo Nardone
has more than 22 years of experience in
security, web and mobile development,
cloud, and IT architecture. His true IT
passions are security and Android.
He has been programming and
teaching how to program with Android,
Perl, PHP, Java, VB, Python, C/C++, and
MySQL for more than 20 years.
He holds a master of science degree
in computing science from the University
of Salerno, Italy.
He has worked as a project manager,
software engineer, research engineer,
chief security architect, information
security manager, PCI/SCADA auditor,
and senior lead IT security/cloud/SCADA architect for many years.
His technical skills include security, Android, cloud, Java, MySQL,
Drupal, Cobol, Perl, web and mobile development, MongoDB, D3,
Joomla, Couchbase, C/C++, WebGL, Python, Pro Rails, Django CMS,
Jekyll, Scratch, etc.
He currently works as Chief Information Security Officer (CISO) for
Cargotec Oyj.
He worked as visiting lecturer and supervisor for exercises at the
Networking Laboratory of the Helsinki University of Technology (Aalto
University). He holds four international patents (PKI, SIP, SAML, and
Proxy areas).
Massimo has reviewed more than 40 IT books for different
publishing companies, and he is the coauthor of Pro Android Games
(Apress, 2015).
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
S. Patni, Pro RESTful APIs with Micronaut
https://doi.org/10.1007/978-1-4842-9200-6_1

1. Fundamentals of RESTful APIs


Sanjay Patni1

(1) Santa Clara, CA, USA

Abstract
APIs are not new. They’ve served as interfaces that enable applications to communicate with
each other for decades. But the role of APIs has changed dramatically in the last few years.
Innovative companies have discovered that APIs can be used as an interface to the business,
allowing them to monetize digital assets, extend their value proposition with partner-
delivered capabilities, and connect to customers across channels and devices. When you
create an API, you are allowing others within or outside of your organization to make use of
your service or product to create new applications, attract customers, or expand their
business. Internal APIs enhance the productivity of development teams by maximizing
reusability and enforcing consistency in new applications. Public APIs can add value to your
business by allowing third-party developers to enhance your services or bring their
customers to you. As developers find new applications for your services and data, a network
effect occurs, delivering significant bottom-line business impact. For example, Expedia
opened up their travel booking services to partners through an API to launch the Expedia
Affiliate Network, building a new revenue stream that now contributes $2B in annual
revenue. Salesforce released APIs to enable partners to extend the capabilities of their
platform and now generates half of their annual revenue through those APIs, which could be
SOAP based (JAX-WS) and, more recently, RESTful (JAX-RS), Spring Boot, and now Micronaut.
A SOAP web service depends upon a number of technologies (such as UDDI, WSDL, SOAP,
HTTP) and protocols to transport and transform data between a service provider and the
consumer and can be created with JAX-WS.
Later, Roy Fielding (in the year 2000) presented his doctoral dissertation, “Architectural
Styles and the Design of Network-based Software Architecture.” He coined the term “REST,” an
architectural style for distributed hypermedia systems. Put simply, REST (short for
REpresentational State Transfer) is an architectural style defined to help create and organize
distributed systems. The keyword from that definition should be “style,” because an
important aspect of REST (and which is one of the main reasons books like this one exist) is
that it is an architectural style—not a guideline, not a standard, or anything that would imply
that there are a set of hard rules to follow in order to end up having a RESTful architecture.
In this chapter, I’ll be covering REST fundamentals, SOAP vs. REST, and web architectural
style to provide a solid foundation and better prepare you for what you’ll see in later chapters.
The main idea behind REST is that a distributed system, organized RESTfully, will improve
in the following areas:
Performance: The communication style proposed by REST is meant to be efficient and
simple, allowing a performance boost on systems that adopt it.
Scalability of component interaction: Any distributed system should be able to handle this
aspect well enough, and the simple interaction proposed by REST greatly allows for this.
Simplicity of interface: A simple interface allows for simpler interactions between systems,
which in turn can grant benefits like the ones previously mentioned.
Modifiability of components: The distributed nature of the system, and the separation of
concerns proposed by REST (more on this in a bit), allows for components to be modified
independently of each other at a minimum cost and risk.
Portability: REST is technology and language agnostic, meaning that it can be implemented
and consumed by any type of technology (there are some constraints that I’ll go over in a
bit, but no specific technology is enforced).
Reliability: The stateless constraint proposed by REST (more on this later) allows for the
easier recovery of a system after failure.
Visibility: Again, the stateless constraint proposed has the added full state of said request
(this will become clear once I talk about the constraints in a bit). From this list, some direct
benefits can be extrapolated. A component-centric design allows you to make systems that
are very fault tolerant. Having the failure of one component not affect the entire stability of
the system is a great benefit for any system. Interconnecting components is quite easy,
minimizing the risks when adding new features or scaling up or down. A system designed
with REST in mind will be accessible to a wider audience, thanks to its portability (as
described earlier). With a generic interface, the system can be used by a wider range of
developers. In order to achieve these properties and benefits, a set of constraints were
added to REST to help define a uniform connector interface. REST is not suggested to use
when you need to enforce a strict contract between a client and a server and when
performing transactions that involve multiple calls.

SOAP vs. REST


Table 1-1 has a comparison between SOAP and REST with an example of use cases each can
support.
Table 1-1 SOAP vs. REST comparison

Topic SOAP REST


SOAP (Simple Object Access Protocol) was created in 1998 REST (Representational State Transfer) was
by Dave Winer et al. in collaboration with Microsoft. created in 2000 by Roy Fielding at UC, Irvine.
Origin Developed by a large software company, this protocol Developed in an academic environment, this
addresses the goal of addressing the needs of the enterprise protocol embraces the philosophy of the open
market Web
Basic Makes data available as services (verb + noun), for example, Makes data available as resources (nouns), for
Concept “getUser” or “PayInvoice” example, “user” or “invoice”
Topic SOAP REST
Follows the philosophy of the open Web
Relatively easy to implement and maintain
Follows a formal enterprise approach
Clearly separates client and server
Works on top of any communication protocol, even implementations
asynchronously
Pros Communication isn’t controlled by a single
Information about objects is communicated to clients entity
Security and authorization are part of the protocol Information can be stored by the client to
Can be fully described using WSDL prevent multiple calls
Can return data in multiple formats (JSON, XML,
etc.)
Spends a lot of bandwidth communicating metadata Only works on top of the HTTP protocol
Cons Hard to implement and is unpopular among web and mobile Hard to enforce authorization and security on
developers top of it
When clients need to have access to objects available on When clients and servers operate on a web
When to servers environment
use When you want to enforce a formal contract between a client When information about objects doesn’t need to
and a server be communicated to the client
When you need to enforce a strict contract
When you want the majority of developers to easily use your
When not between a client and a server
API
to use When performing transactions that involve
When your bandwidth is very limited
multiple calls
Social media services
Financial services
Social networks
Use cases Payment gateways
Web chat services
Telecommunication services
Mobile services
www.salesforce.com/developer/docs/api/—
Examples https://dev.twitter.com/
Salesforce SOAP API
Use SOAP if you are dealing with transactional operations Use REST if you’re focused on wide-scale API
Conclusion and you already have an audience that is satisfied with this adoption or if your API is targeted at mobile
technology apps

Web Architectural Style


According to Fielding, there are two ways to define a system:
One is to start from a blank slate—an empty whiteboard—with no initial knowledge of the
system being built or the use of familiar components until the needs are satisfied.
A second approach is to start with the full set of needs for the system, and constraints are
added to individual components until the forces that influence the system are able to
interact in harmony with each other.
REST follows the second approach. In order to define a REST architecture, a null state is
initially defined—a system that has no constraints whatsoever and where component
differentiation is nothing but a myth—and constraints are added one by one. The following
subsections cover web architectural style constraints. Each of these constraints defines how
the framework for RESTful APIs should be architected and designed. Security is another
aspect which needs to be considered independently as part of this framework when rolling
out RESTful APIs to the end users.

Client-Server
The separation of concerns is the core theme of the Web’s client-server constraints.
The Web is a client-server-based system, in which clients and servers have distinct parts
to play.
They may be implemented and deployed independently, using any language or technology,
so long as they conform to the Web’s uniform interface.

Uniform Resource Interface


The interactions between the Web’s components—meaning its clients, servers, and network-
based intermediaries—depend on the uniformity of their interfaces.
Web components interoperate consistently within the uniform interface’s four constraints,
which Fielding identified as
Identification of resources
Manipulation of resources through representations
Self-descriptive messages
Hypermedia as the engine of application state (HATEOAS)

Layered System
Generally speaking, a network-based intermediary will intercept client-server communication
for a specific purpose.
Network-based intermediaries are commonly used for enforcement of security, response
caching, and load balancing.
The layered system constraints enable network-based intermediaries such as proxies and
gateways to be transparently deployed between a client and a server using the Web’s uniform
interface.

Caching
Caching is one of web architecture’s most important constraints. The cache constraints
instruct a web server to declare the cache ability of each response’s data.
Caching response data can help to reduce client-perceived latency, increase the overall
availability and reliability of an application, and control a web server’s load. In a word,
caching reduces the overall cost of the Web.

Stateless
The stateless constraint dictates that a web server is not required to memorize the state of its
client applications. As a result, each client must include all of the contextual information that
it considers relevant in each interaction with the web server.
Web servers ask clients to manage the complexity of communicating their application
state so that the web server can service a much larger number of clients. This trade-off is a
key contributor to the scalability of the Web’s architectural style.

Code on Demand
The Web makes heavy use of code on demand, a constraint which enables web servers to
temporarily transfer executable programs, such as scripts or plug-ins, to clients.
Code on demand tends to establish a technology coupling between web servers and their
clients, since the client must be able to understand and execute the code that it downloads on
demand from the server. For this reason, code on demand is the only constraint of the Web’s
architectural style that is considered optional.
HATEOAS
The final principle of REST is the idea of using hypermedia as the engine of application state
(HATEOAS). When developing a client-server solution using HATEOAS, the logic on the server
side might change independently of the clients.
Hypermedia is a document-centric approach with the added support for embedding links
to other services and information within the document format.
One of the uses of hypermedia and hyperlinks is composing complex sets of information
from disparate sources. The information could be within a company private cloud or within a
public cloud from disparate sources.
Example:

<podcast id="111">
<customer>http://customers.myintranet.com/customers/1</customers>
<link>http://podcast.com/myfirstpodcast</link>
<description> This is my first podcast </description>
</podcast>

Each of these web architecture styles adds beneficial properties to the web system.
By adopting these constraints, teams can build simple, visible, usable, accessible,
evolvable, flexible, maintainable, reliable, scalable, and performant systems as shown in Table
1-2.
Table 1-2 Constraint and system property

By Following the Constraint Gain the Following System Property


Client-server interactions Simple, evolvable, scalable
Stateless communications Simple, visible, maintainable, evolvable, and reliable
Cacheable data Visible, scalable, and performant
Uniform interfaces Simple, usable, visible, accessible, evolvable, and reliable
Layered system Flexible, scalable, reliable, and performant
Code on demand Evolvable

Note I have not covered security in this book as part of REST fundamentals, but security
is very important for rolling out RESTful APIs.

What Is REST?
We have briefly introduced REST with REST API fundamentals in the previous section. This
section has further introductory details about REST concepts.
“REST” was coined by Roy Fielding in his Ph.D. dissertation to describe a design pattern
for implementing networked systems. REST is Representational State Transfer, an
architectural style for designing distributed systems. It’s not a standard, but rather a set of
constraints. It’s not tied to HTTP, but is associated most commonly with it.

REST Basics
Unlike SOAP and XML-RPC, REST does not really require a new message format. The HTTP
API is CRUD (Create, Retrieve, Update, and Delete):
GET = “give me some info” (Retrieve)
POST = “here’s some update info” (Update)
PUT = “here’s some new info” (Create)
DELETE = “delete some info” (Delete)
And more….
PATCH = The HTTP method PATCH can be used to update partial resources. For instance,
when you only need to update one field of the resource, PUTting a complete resource
representation might be cumbersome and utilizes more bandwidth.
HEAD = The HEAD method is identical to the GET method, except that the server must not
return a message body in the response. This method is often used for testing hypertext
links for validity, accessibility, and recent modification.
OPTIONS = This method allows the client to determine the options and/or requirements
associated with a resource or the capabilities of a server, without implying a resource
action or initiating a resource retrieval.
Notion of “idempotency”: The idea that when sending a GET, DELETE, or PUT to the system,
the effect should be the same whether the command is sent one or more times, but POST
creates an entity in the collection and therefore is not idempotent.

REST Fundamentals
Just to remind you, about 8356 APIs were written in REST by ProgrammableWeb.com in
2016. REST is a resource-based architecture. A resource is accessed via a common interface
based on the HTTP standard methods. REST asks developers to use HTTP methods explicitly
and in a way that’s consistent with the protocol definition. Each resource is identified by a
URL. Every resource should support the HTTP common operations, and REST allows that
resource to have different representations, for example, text, xml, json, etc. The REST client
can ask for a specific representation via the HTTP protocol (content negotiation). Table 1-3
describes data elements used in REST.
Table 1-3 Structures of REST

Data Element Description


Resource Conceptual target of a hypertext reference, e.g., customer/order
Resource A uniform resource locator (URL) or uniform resource name (URN) identifying a specific resource, e.g.,
Identifier http://myrest.com/customer/3435
Resource
Information describing the resource, e.g., tag, author, source link, alternate location, alias names
Metadata
Representation The resource content—JSON Message, HTML Document, JPEG Image
Representation
Information describing how to process the representation, e.g., media type, last-modified time
Metadata
Information describing how to optimize response processing, e.g., if-modified-since, cache-control-
Control Data
expiry

Let’s look at some examples.

Resources
First, here’s a REST resource to GET a list of podcasts:

http://prorest/podcasts

Next, here’s a REST resource to GET details of podcast id 1:


http://prorest/podcasts/1

Representations
Here is an XML representation of a response—GET customer for an id:

<Customer>
<id>123</id>
<name>John</name>
</Customer>

Next, here’s a JSON representation of a response—GET customer for an id:

{"Customer":{"id":"123","name":"John"}}

Content Negotiation
HTTP natively supports a mechanism based on headers to tell the server about the content
you expect and you’re able to handle. Based on these hints, the server is responsible for
returning the corresponding content in the correct format. Figure 1-1 shows an example.

Figure 1-1 Content negotiation

If the server doesn’t support the requested format, it will send back a 406 status code (Not
Acceptable) to notify the client that made the request (“The requested resource is only
capable of generating content not acceptable according to the Accept headers sent in the
request”) according to the specification.

Summary
REST identifies the key architectural principles of why the Web is prevalent and scalable. The
next step in the education of the Web is to apply these principles to the semantics Web and
the world of web services. REST offers a simple, interoperable, and flexible way of writing
web services that can be very different than the WS-* that so many of you had training in. In
the next chapter, we will introduce Micronaut—A morder JVM based, full-stack framework for
building modular, easily testable micro service and server less applications. We will also
compare it with similar framework Spring Boot.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
S. Patni, Pro RESTful APIs with Micronaut
https://doi.org/10.1007/978-1-4842-9200-6_2

2. Micronaut
Sanjay Patni1

(1) Santa Clara, CA, USA

Abstract
Micronaut is a JVM-based modern full-stack microservice framework.
This new framework has been developed by the Grails team with an
intention to solve problems which have been identified over the years
while building the real-world microservices applications.
One of the most exciting features of Micronaut is its compile-time
dependency injection mechanism. Most frameworks use reflection and
proxies to perform dependency injection at runtime. Micronaut,
however, builds its dependency injection data at compile time. The
result is faster application startup and smaller memory footprints.
I think it is not an exaggeration if I say we are living in the age of
microservices. Microservices became the de facto architecture pattern
for every new enterprise-scale application that is being implemented,
and many existing monolithic applications are getting migrated into
microservices. In the case of the Java world, Spring Boot turned out to
be the standard framework to develop microservices. There were some
other frameworks like DropWizard, Apache Karaf, and Jersey. But they
were not able to give tough competition to Spring Boot, and slowly their
usage percentage came down and became insignificant over a period of
time. If you observe the evolution of Spring Boot, initially it was not
proposed as a microservices solution from Spring. It was initially
proposed and implemented as the containerless web application, and
the developer community started using it for microservices
implementation. But Spring Boot got its own limitations like
Fixed single language
Lack of built-in support for data accessing
Lack of simpler unit testing
Lack of built-in service discovery
Lack of built-in load balancing
We need explicit configuration which can be achieved through the
cloud services instead of having the built-in support within the
framework itself.
Here comes Micronaut which contains the aforementioned built-in
features and designed with single and primary intent to serve as the
vehicle for microservices development.

Comparison of Micronaut with Spring Boot


Ease of Installation
Both Spring Boot and Micronaut won’t be complex for installation and
can be installed easily by following the installation instructions. Both
frameworks need the following prerequisites:
A favorite text editor or IDE
JDK 1.8 or later
Gradle or Maven latest versions
The code which has been generated through the CLI tool can be
directly imported into your IDE:
Spring Tool Suite (STS): Spring Boot
Visual Studio Code: Micronaut

Natively Cloud Enabled


When it comes to Spring Boot, to support the previously discussed
cloud-specific features, we need to depend on the third-party cloud
services or libraries; it doesn’t support any of the above-listed features
by default, so Micronaut has an advantage here.
The following list of cloud-specific features is directly integrated
into the Micronaut runtime:
Service discovery.
Eureka, Consul, or ZooKeeper service discovery servers are being
supported.
The Kubernetes container runtime is supported by default.
Client-side load balancing.
Netflix Ribbon can be used for load balancing.
Distributed configuration.
Distributed tracing.
Serverless functions.

Serverless Functions
Serverless architecture, where developers will deploy the function.
From there onward, they are completely managed by the cloud
environment, that is, invocation, execution, and control. But
Micronaut’s fast startup time, compile-time approach, and low-memory
footprint make this framework a great candidate for developing
functions, and in fact, Micronaut features have the dedicated support
for implementing and deploying functions to the AWS Lambda and any
FaaS system that supports running functions as containers.

Application Configuration
Micronaut inspired from both Grails and Spring Boot in integrating
configuration properties from different sources directly into the core
IoC container. Configurations can be provided by default in either
YAML, JSON, Java properties, or Groovy files. The convention is to
search for a file called application.yml, application.properties,
application.json, or application.groovy.
Command-line arguments
Properties from SPRING_APPLICATION_JSON (only if there is any
Spring dependency)
Properties from MICRONAUT_APPLICATION_JSON
Java system properties
OS environment variables
Each environment-specific properties like application-
{environment}.{extension} (could be .properties, .json, .yml, or
.groovy)
Application-specific properties from the application.{extension}
(could be .properties, .json, .yml, or .groovy)
( p p j y g y)
Special properties (random values)
Spring Boot supports all the preceding property locations; in
addition, it also supports other property locations:
Spring Boot devtools global settings properties
@TestPropertySource annotations on your tests
@SpringBootTest#properties annotation attribute on your tests
ServletConfig init parameters
ServletContext init parameters
JNDI attributes from java:comp/env
@PropertySource annotations on your @Configuration classes
Default properties (specified by setting
SpringApplication.setDefaultProperties)
“Spring Boot provided more ways to handle with properties when
we compared it against Micronaut.”

Messaging System Support


Spring Boot supports the integration of external messaging systems,
such as
RabbitMQ
Apache Kafka
ActiveMQ
Artemis
Micronaut also supports the popular messaging systems, such as
RabbitMQ
Apache Kafka
“Micronaut has the embedded support for the Apache Kafka.” “Both
frameworks have the support of the popular messaging systems but
Spring Boot supports more tools.”

Security
Spring Boot supports the following security mechanisms by default:
MVC Security
WebFlux Security
OAuth2
Actuator Security
Micronaut supports the following security mechanisms by default:
Authentication Providers
Security Rules
IP Pattern Rule
Secured Annotation
Intercept URL Map
Built-In Endpoints Security
Authentication Strategies
Basic Auth
Session Authentication
JSON Web Token
Built-In Security Controllers
Retrieve the Authenticated User
Security Events

Caching
Spring Boot supports the following caching providers:
Redis
Couchbase
Generic
JCache (JSR-107)
EhCache 2.x
Hazelcast
Infinispan
Caffeine
Micronaut supports the following list of caching providers:
Caffeine (by default, Micronaut supports it)
Redis
“Obviously, Spring Boot is leading in supporting caching providers.”

Management and Monitoring


Micronaut inspired by the Grails, Spring Boot, and Micronaut
management dependency adds support to monitor your applications
via endpoints, the special URIs that return details about the state of
your application and health:
Creating endpoints
Built-in endpoints

API Portfolio
This book will take three business domain problems and build a
portfolio of APIs.

Online Flight
To illustrate features of Micronaut, this book will take an example of an
“online flight” application. The application will enable passengers to
view flight they are traveling. You will define two component classes:
1.
A service component that lets a passenger see what flights they are
booked in.
2.
A repository component that stores passengers for a flight. Initially,
you will store passengers in memory for simplicity.

Object Field Type


Passenger Name String
Flight Origin String
Destination String
Departure Datetime
Flight# int

Message
This API will enable sending messages to the users in the system.

Object Fields Type


Message Message String
Object Fields Type
From String
To String
Creation Date Date

Quote
To illustrate features of Micronaut data, this book will take an example
of an “online quote” application. The application will enable buyers to
create and view quotes including products they want to buy. You will
define three component classes:
1.
Catalog to list products with their price
2.
Quote for a customer including line items of the products with total
price
3.
Quote line item including products with unit price and quantity

Object Field Type


Product Name String
Description String
Unit Price Float
Quote Customer String
Quote Date Date
Address Object
Quote Line Object
Total Price Float
Quote Line Product Object
Quantity Long
Unit Price Float

Software
This book will use the following software for the coding problems.
Micronaut
https://micronaut.io/download/
INSTALLING WITH SDKMAN!
This tool makes installing the Micronaut framework on any Unix-
based platform (Mac OSX, Linux, Cygwin, Solaris, or FreeBSD) easy.
Simply open a new terminal and enter

$ curl -s https://get.sdkman.io | bash

Follow the on-screen instructions to complete installation. Open a


new terminal or type the command:

$ source "$HOME/.sdkman/bin/sdkman-init.sh"

Then install the latest stable version of the framework:

$ sdk install micronaut

If prompted, make this your default version.


After installation is complete, it can be tested with

$ mn --version

That’s all there is to it!


Now let’s create “hello from Micronaut.”
It is assumed that micronaut 3, gradle and jdk11 is installed.
mn create-app hello-world

JDK 11
https://jdk.java.net/archive/

POSTMAN
www.postman.com/downloads/

CURL
https://curl.se/download.xhtml
IDE
You have two choices to use the IDE.

Visual Studio Code


https://code.visualstudio.com/download

IntelliJ
www.jetbrains.com/idea/download/

Maven
https://maven.apache.org/download.cgi

Setting Up an IDE
The application created in the previous section contains a “main class”
located in src/main/java that looks like the following:

package hello.world;
import io.micronaut.runtime.Micronaut;
public class Application {
public static void main(String[] args) {
Micronaut.run(Application.class);
}
}

This is the class that is run when running the application via Gradle
or via deployment.
Configuring Visual Studio Code
In this book, we will illustrate the use of Visual Studio Code for editing
Java code.
Open code created in the hello-world folder by clicking “Open” and
navigating to the hello-world folder. Micronaut can be set up within
Visual Studio Code. You will need to first install the Java Extension Pack.

Extension Pack for Java is a collection of popular extensions that can


help write, test, and debug Java applications in Visual Studio Code.
Visual Studio Code support currently only works for Maven builds. The
hello world example will run using the command line since it uses
gradle.
https://code.visualstudio.com/docs/java/extensio
ns
Once the extension pack is installed, you could use an IDE for
editing Java code.
Now create a new class using File ➤ New File ➤ New Java Class and
paste

package hello.world;
import io.micronaut.http.MediaType;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
@Controller("/hello") public class HelloController
{
@Get(produces = MediaType.TEXT_PLAIN)
public String index() {return "Hello from
Micronaut"; }
}

Save the file as HelloController.java. Files will look like the


preceding example. Now to run from the command prompt

cd ~/hello-world
./gradlew run
curl http://localhost:8080/hello

You can also run the application from an IDE by selecting


Application.java and right-clicking and running.
https://walkingtreetech.medium.com/spring-boot-
vs-micronaut-the-battle-unleashed-2682354a88e9

Summary
In this chapter, we reviewed features of Micronaut and compared those
with Spring Boot. We also analyzed sample domains—flight status
message, and quote to create a portfolio of APIs using Micronaut.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
S. Patni, Pro RESTful APIs with Micronaut
https://doi.org/10.1007/978-1-4842-9200-6_3

3. Introduction: XML and JSON


Sanjay Patni1

(1) Santa Clara, CA, USA

Abstract
This chapter introduces basic concepts about XML and JSON. At the end of this chapter,
there is an exercise to demonstrate XML and JSON responses from a Micronaut app.

What Is XML?
eXtensible Markup Language (XML) is a text-based markup language which is a standard
for data interchange on the Web. As with HTML, you identify data using tags (identifiers
enclosed in angle brackets, like this: <...>). Collectively, the tags are known as “markup.”
It puts a label on a piece of data that identifies it (e.g., <message>...</message>). In
the same way that you define the field names for a data structure, you are free to use any
XML tags that make sense for a given application. Naturally, though, for multiple
applications to use the same XML data, they have to agree on the tag names they intend to
use. Here is an example of some XML data you might use for a messaging application:

<message>
<to>[email protected]</to>
<from>[email protected]</from>
<subject>XML Is Really Cool>
</subject>
<text>
How many ways is XML cool? Let me count the ways...
</text>
</message>

Tags can also contain attributes (additional information included as part of the tag
itself) within the tag’s angle brackets. If you consider the information in question to be
part of the essential material that is being expressed or communicated in the XML, put it in
an element. For human-readable documents, this generally means the core content that is
being communicated to the reader. For machine-oriented record formats, this generally
means the data that comes directly from the problem domain. If you consider the
information to be peripheral or incidental to the main communication, or purely intended
to help applications process the main communication, use attributes. The following
example shows an email message structure that uses attributes for the to, from, and
subject fields:

<message [email protected] [email protected]


subject="XML Is Really Cool">
<text>
How many ways is XML cool? Let me count the ways...
</text>
</message>

One really big difference between XML and HTML is that an XML document is always
constrained to be well formed. There are several rules that determine when a document is
well formed, but one of the most important is that every tag has a closing tag. So, in XML,
the </to> tag is not optional. The <to> element is never terminated by any tag other than
</to>.

Note Another important aspect of a well-formed document is that all tags are
completely nested. So you can have <message>..<to>..</to>..</message>, but
never <message>..<to>..</message>..</to>.

An XML Schema is a language for expressing constraints about XML documents. There are
several different schema languages in widespread use, but the main ones are Document
Type Definitions (DTDs). It defines the legal building blocks of an XML document. It also
defines the document structure with a list of legal elements and attributes.

XML Comments
XML comments look just like HTML comments:

<message [email protected] [email protected]


subject="XML Is Really Cool">
<!-- This is comment -->
<text>
How many ways is XML cool? Let me count the ways...
</text>
</message>

To complete this introduction to XML, note that an XML file always starts with a prolog.
The minimal prolog contains a declaration that identifies the document as an XML
document, like this:

<?xml version="1.0"?>

The declaration may also contain additional information, like this:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>


version: Identifies the version of the XML markup language used in the data. This
attribute is not optional.
encoding: Identifies the character set used to encode the data. “ISO-8859-1” is “Latin-1,”
the Western European and English language character set. (The default is compressed
Unicode: UTF-8.)
standalone: Tells whether or not this document references an external entity or an
external data type specification. If there are no external references, then “yes” is
appropriate.

Why Is XML Important?


It is important because it allows the flexible development of user-defined document types,
which means that it provides a persistent, robust, nonproprietary, and verifiable file format
which can be used for the storage and transmission of data for both on and off the Web. In
addition, XML
Provides plain text: Plain text makes it readable.
Provides data identification: By use of tags, data can be identified.
Provides styleability: Using XSLT (Extensible Stylesheet Language Transformations),
data can be made in a presentable form.
Is easily processed (XML parsers, as well as well-formed parsers).
Is hierarchical (through nested tags).

How Can You Use XML?


There are several basic ways to make use of XML:
Document-driven programming, where XML documents are containers that build
interfaces and applications from existing components
Archiving: The foundation for document-driven programming, where the customized
version of a component is saved (archived) so it can be used later
Binding, where the DTD or schema that defines an XML data structure is used to
automatically generate a significant portion of the application that will eventually
process that data

Pros and Cons of XML


Some of the pros and cons of XML are explained as follows:
Pros
Readable and editable by developers.
Error checking by means of schema and DTDs.
Can represent complex hierarchies of data.
Unicode gives flexibility for international operation.
Plenty of tools in all computer languages for both creation and parsing.
Cons
Bulky text with low payload/formatting ratio (but can be compressed).
Both creation and client-side parsing are CPU intensive.
Common word processing characters are illegal (MS Word “smart” punctuation, for
example).
Images and other binary data require extra encoding.

What Is JSON?
JSON or JavaScript Object Notation is a lightweight text-based open standard designed for
human-readable data interchange. Conventions used by JSON are known to programmers,
which include those with knowledge of C, C++, Java, Python, Perl, etc.
The format was specified by Douglas Crockford.
It was designed for human-readable data interchange.
It has been extended from the JavaScript scripting language.
The filename extension is .json.
The JSON Internet media type is application/json.
JSON is easy to read and write.
JSON is language independent.

JSON Syntax
In this section, we will discuss what JSON’s basic data types are and their syntax. Figure 3-
1 shows the basic data types of JSON.

Figure 3-1 Basic data types

Strings
Strings are enclosed in double quotes and can contain the usual assortment of escaped
characters.

Numbers
Numbers have the usual C/C++/Java syntax, including exponential (E) notation. All
numbers are decimal—no octal or hexadecimal.

Objects
An object is an unordered set of a name/value pair. The pairs are enclosed within braces ({
}).
Example:

{ "name": "html", "years": 5 }


Pairs are separated by commas. There is a colon between the name and the value.
The syntax of a JSON object is shown in Figure 3-2.

Figure 3-2 JSON object

Arrays
An array is an ordered collection of values. The values are enclosed within brackets. The
syntax of JSON arrays is shown in Figure 3-3.

Figure 3-3 JSON arrays

Booleans
It can have either true or false values.

Null
The value is that it’s empty.

Why Is JSON Important?


There is a reason why JSON is becoming very popular as a data exchange format (more
important than it being less verbose than XML): programmers are sick of writing parsers!
But “wait,” you say. “Surely there are XML parsers available for you to use so that you don’t
have to roll your own.” Yes, there are. But while XML parsers handle the low-level syntactic
parsing of XML tags, attributes, etc., you still need to walk the DOM tree or, worse, build
one yourself with nothing but a SAX parser (Objective-C iPhone SDK I’m looking at you!).
And that code you write will of course depend on whether the XML you need to make
sense of looks like this:

1 <person first-name="John" last-name="Smith"/>

or this:

1 <person>
2 <first-name>John</first-name>
3 <last-name>Smith</last-name>
4 </person>

or this:
1 <object type="Person">
2 <property name="first-name">John</property>
3 <property name="last-name">Smith</property>
4 </object>

or any of the myriad of other ways one can conceive of expressing the same concept
(and there are many). The standard XML parser does not help you in this regard. You still
need to do some work with the parse tree.
Working with JSON is a different, and superior, experience. First, the simpler syntax
helps you avoid the need to decide between many different ways of representing your data
(as we saw earlier with XML), much less which rope to hang yourself with. Usually, there is
only one straightforward way to represent something:

1 { "first-name" : "John",
2 "last-name" : "Smith" }

How Can You Use JSON?


The following discusses how you can use JSON:
It is used while writing JavaScript-based applications that include browser extensions
and websites.
JSON format is used for serializing and transmitting structured data over a network
connection. It is primarily used to transmit data between a server and web applications.
Web services and APIs use JSON format to provide public data.

Pros and Cons of JSON


The following are pros and cons of JSON:
Pros
Easy to read/write/parse
Reasonably succinct (compared with XML, for instance)
Common “standard” with many libraries available
Cons
Not as light as binary formats.
Can’t use comments.
It’s “encapsulated,” meaning that you can’t readily stream/append data, but have to
break it up into individual objects. XML has the same problem, whereas CSV does not.
Difficult to describe the data you’re presenting (easier with XML).
Unable to enforce, or validate against, a structure/schema.

XML and JSON Comparison


This section compares XML and JSON based upon different properties.
Table 3-1 XML and JSON comparison

Property XML JSON


XML is simple and
Simplicity JSON is much simpler than XML as well as human-readable
human-readable
Property XML JSON
Self-Describing Yes Yes
XML is processed
Processing JSON is processed more easily because its structure is simpler
easily
Not optimized for
Performance performance due Faster than XML because of size
to tags
JSON is at least as open as XML, perhaps more so because it is not in the
Openness XML is open
center of a corporate/political standardization struggle
XML is document JSON is data oriented. JSON can be mapped more easily to object-oriented
Object-Oriented
oriented systems
XML is
Interoperability JSON has the same interoperability potential as XML
interoperable
Internationalization Supports Unicode Supports Unicode
JSON is not extensible because it does not need to be. JSON is not a document
Extendability XML is extensible markup language, so it is not necessary to define new tags or attributes to
represent data in it
XML is widely
JSON is just beginning to become known. Its simplicity and the ease of
Adoption adopted by the
converting XML to JSON makes JSON ultimately more adoptable
industry

Implementing APIs to Return XML and JSON Messages


https://micronaut.io/launch/
As per the screen, select
Application Type: Micronaut Application
Java Version: 11
Name: message
Package: com.rest
Build Tool: maven
Click “Generate Project.”
Open message in Visual Source Code.
Now add a new folder model by selecting File ➤ Add new folder and navigating to code
generated by Micronaut.

Then create a new domain class Message.

The following code creates a domain object Message with an attribute message. Getter and
setter methods are created in the IDE.

package com.rest.model;

import javax.validation.constraints.NotNull;

public class Message {


@NotNull
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
~

Now create a new folder controller after navigating to message code generated by
Micronaut.
The following code exposes two endpoints:
a.
message/xml for getting the message attribute value in XML
b. Message/json for getting the message attribute value in JSON format
Create a controller:

package com.rest.controllers;
import com.rest.model.Message;
import io.micronaut.http.annotation.Get;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.HttpResponse;
import io.micronaut.http.MediaType;
import io.micronaut.http.annotation.Produces;

@Controller("/message") // <2>
public class MessageController {

@Produces(MediaType.TEXT_XML)
@Get("/xml")
public HttpResponse<?> messageXml() {
Message message = new Message();
message.setMessage("Hello from Micronaut");
final String xml = encodeAsXml(message);
return
HttpResponse.ok(xml).contentType(MediaType.APPLICATION_XML_TYPE);
}
@Produces(MediaType.TEXT_JSON)
@Get("/json")
public HttpResponse<?> messageJson() {
Message message = new Message();
message.setMessage("Hello from Micronaut");
return HttpResponse.ok(message);
}

private String encodeAsXml(final Message message) {


return String.format("<message>%s</message>",
message.getMessage());
}

}
Other documents randomly have
different content
"Might it not be better, in your grace's good judgment," said Sir
Payan, "to take the duke's person at once? For assuredly, as soon as
he hears that his minion is committed, he will become alarmed, and
find security in some foreign land."

"He shall be so well watched," said Wolsey, closing his hand


tightly, as if he grasped his enemy, "that were he no larger than a
meagre ermine, he should not escape me. No; we must let him
condemn himself full surely. But, Sir Payan, are you prepared to
accompany me to Richmond?"

"If by any chance this Maurice were to see me with your grace,"
replied Sir Payan, "he would lose no time, but fly instantly, before
you had speech of his grace the king. If you think it necessary, my
lord, that I should attend you, it may be well to arrest the traitor
immediately on your arrival."

"Nay, nay, nay!" said Wolsey, shaking his head. "You know not
Henry, Sir Payan; he is hard and difficult to rule, and, were I to
arrest Sir Osborne, would take for insult what was meant as a
service. But you shall not go: there is, indeed, no need. These
papers are quite enough, with the testimony of the priest. Let him
be sent down post-haste to Richmond after me."

"He shall, my lord," replied Sir Payan. "But one word more, your
grace. If the Duke of Buckingham be condemned, his estates, of
course, are forfeited to the crown. Near me lies his beautiful manor
of the Hill, in Kent, and I know your grace will not forget your
faithful servants." Wolsey paused, and Sir Payan went on. "To show
how constantly present your grace is to all my thoughts, you told me
some time ago that you desired to have two of the tallest men in the
realm for porters of the gate. Cast your eyes through that window,
my lord, and I think you will see two that no prince in Europe can
match in his hall."
No service that Sir Payan could have rendered, either to the state
or to himself, would have given half so much pleasure to Wolsey as
the possession of the two gigantic Cornishmen we have before
mentioned; for, amongst all his weaknesses, his passion for having
tall men about him was one of the most conspicuous. As soon as for
a moment or two he had considered them attentively through the
window, and compared them with all the pigmy-looking race around,
he thanked Sir Payan with infinite graciousness for his care; and
hinted, though he did not promise, that Buckingham's manor in Kent
might be the reward. While he yet spoke, a gentleman-usher
entered, to announce that the barge was ready; and, giving some
more directions to Sir Payan, in regard to sending the priest, Wolsey
rose to proceed on his journey. The procession, without which he
never moved, was already arranged in the ante-chamber, consisting
of marshals and gentlemen-ushers, with two stout priests bearing
the immense silver crosses of his archbishopric and his legacy; and
the moment he moved towards the door, the ushers pressed
forward, crying, "On before, my lords and masters! on before! Make
way for the lord cardinal! Make way for my lord's grace! On before!
on before!"

Wolsey immediately followed, and proceeded to his barge; while


Sir Payan returned to his own house in Westminster, and despatched
the priest to Richmond, after which he sat himself down to write.
What he did write consisted of but a few lines, but they were of
some import; and as soon as they were finished, he entrusted them
to one of his shrewdest and most assured servants, with many a
long direction, and many an injunction to speed.
CHAPTER XXIV.

This hour's the very crisis of your fate:


Your good or ill, your infamy or fame,
And all the colour of your life depends
On this important now.--The Spanish Friar.

If any one will look at the almanac for the year 1520, he will find
marked, opposite the 4th day of May, the following curious piece of
information: "High-water at London Bridge at half-past three;" and,
if he calculate rightly, he will discover that as Wolsey set out from
what was then called the Cardinal's Bridge[15] at high noon, he had
the most favourable tide in the world for carrying him to Richmond.
His rowers, too, plied their oars with unceasing activity; and his
splendid barge, with its carved and gilded sides, cut rapidly through
the water, but still not rapidly enough for his impatience.

Siting under an awning, with a table before him, at which was


placed a clerk, he sometimes read parts of the various papers that
had been presented during the morning, and sometimes dictated to
the secretary; but more frequently gave himself up to thought,
suffering his mind to range in the wild chaos of political intrigue,
which was to him like the labyrinth a man makes in his own garden,
in which a stranger might lose his way, but where he himself walks
for his ease and pleasure. Not that Wolsey's mind was one that
soared above the pains of political life; for his were all the throbbing
anxieties of precarious power, his was all the irritation of susceptible
pride and insatiable vanity; while jealous envy, avarice, and
ambition, at once made the world a desert, and tormented him with
unquenchable thirst.
No surer road to Wolsey's hatred existed than the king's favour;
and since his return to London, though but one evening had passed,
yet often had his heart rankled at hearing from those who watched
for him in his absence, that a young stranger, named Sir Osborne
Maurice, had won the king's regard and become the sharer of all his
pleasures. The information given him by Sir Payan Wileton had
placed in his hand arms against this incipient rival, as he deemed
him, which were sure to crush him; and, with a sort of pride in the
conquest he anticipated, he muttered to himself, as he saw the
narrowing banks of the river, approaching towards Richmond, "Now,
Sir Osborne Maurice! now!"

The boat touched the shore; and while the chief yeoman of the
barge, as his privilege, supported the arm of the cardinal, the two
stout priests bearing the crosses hurried to land with the other
attendants, and ranged themselves in order to proceed before him.
Two of his running footmen sped on to announce his approach, and
the rest, with the form and slowness of a procession, traversed the
small space that separated them from the court, reached the gate,
and entering the palace, Wolsey, more like an equal prince than a
subject, passed towards the king's privy-chamber, amidst the
profound bows and reverences of all the royal attendants, collected
to do honour to his arrival.

Many had been the rumours in the palace during the morning
respecting the king's health, and it was generally reported that the
accident of the day before had thrown him into a fever. This,
however, was evidently not the case; for a little before noon Sir
Osborne Maurice had received a message by one of the royal pages,
to the effect that at three o'clock the king would expect him in his
privy-chamber. That hour had nearly approached, and the young
knight was preparing to obey Henry's commands, when a note was
put into his hands by Mistress Margaret, the waiting-woman of Lady
Constance de Grey. It was a step which Sir Osborne well knew she
would not have taken had it not been called for by some particular
circumstance, and with some alarm he opened the paper and read--
The lord cardinal is here: remember your promise. Tarry not
rashly, if you love Constance.

As Wolsey had ever been a declared enemy to his father, and a


steady supporter of Sir Payan Wileton, Sir Osborne felt that the
prospect was certainly in some degree clouded by his arrival; and
while at the court, he had heard enough of the jealousy that the
favourite entertained towards all who often approached the king, to
make him uneasy with regard to the future. But yet he could not
imagine that the regard of Henry would be easily taken from him,
nor the service he he had rendered immediately forgotten; and
strong in the integrity of his own heart, he would not believe that
any serious evil could befall him; yet the warning of Sir Cesar still
rung in his ears, and made an impression which he could not
overcome.

It would be very easy to represent our hero as free from every


failing and weakness, even from those of the age he lived in; easy to
make him as perfect as ever man was drawn, and more perfect than
ever man was known: but then we should be writing a romance, and
not a true history. Sir Osborne was not perfect; and living in an age
whose weakness it was to believe implicitly in judicial astrology, he
shared in that weakness, though but in a degree; and might, indeed,
have shared still less, had not the very man who seemed to take
such an interest in his fate acquired in the court where he lived a
general reputation for almost unerring perception of approaching
events. No one that the young knight met, no one that he heard of,
doubted for a moment that Sir Cesar possessed knowledge
superhuman: to have doubted of the possibility of acquiring such
knowledge, would have been in those times a piece of scepticism
fully equal in criminality to doubting the sacred truths of religion;
and therefore we cannot be surprised that he felt a hesitation, an
uneasiness, a sort of presentiment of evil, as he approached the
privy chamber of the king.
At the door of the ante-chamber, however, he found stationed a
page, who respectfully informed him that the king was busy on
affairs of state with the cardinal lord chancellor, and that his grace
had bade him say, that as soon as he was at leisure he would send
for him to his presence.

Sir Osborne returned to his own apartment, and after calling for
Longpole, walked up and down the room for a moment or two, while
some curious, vague feelings of doubt and apprehension passed
through his mind.

"'Tis very foolish!" said he, at length; "and yet 'tis no harm to be
prepared. Longpole, saddle the horses, and have my armour ready.
'Tis no harm to be prepared;" and quitting his own chambers, he
turned his steps towards those of Lady Constance, which here, not
like the former ones in the palace at Greenwich, were situated at the
other extremity of the building. His path led him again past the royal
lodgings; and as he went by, Sir Osborne perceived that the page
gave entrance to a priest, whose figure was in some degree familiar
to his eye. Where he had seen him he did not know; but, however,
he staid not to inquire, and proceeded onward to the door of Lady
Constance's apartments. One of her women gave him entrance, and
he soon reached her sitting-chamber, where he found her calmly
engaged in embroidery. But there, also, was good Dr. Wilbraham,
who of late had shrewdly begun to suspect a thing that was already
more than suspected by half the court; namely, that Sir Osborne
Maurice was deeply in love with Constance de Grey, and that the
lady was in no degree insensible to his affection. Now, though the
good doctor had thought in the first instance that Lady Constance's
marriage with Lord Darby would be the very best scheme on earth,
he now began to think that the present arrangement would be a
great deal better: his reasoning proceeding in the very inverse of
Wolsey's, and leading him to conclude that as Lord Darby had quite
enough of his own, it would be much better for Lady Constance to
repair, with her immense wealth, the broken fortunes of the ancient
house of Fitzbernard, and at the same time secure her own
happiness by marrying the best and the bravest of men.
Notwithstanding all this, he could not at all comprehend, and never
for a moment imagined, that either Constance or her lover might in
the least wish his absence; and therefore, with great satisfaction at
beholding their mutual love, he remained all the time that Sir
Osborne dared to stay, and conducted him to the door with that
affectionate respect which he always showed towards his former
pupil. While the old clergyman stood bidding Sir Osborne farewell, a
man habited like a yeoman approached, inquiring for the lodging of
Lady Constance de Grey; and on being told that it was before him,
he put a folded note into the hands of Dr. Wilbraham, begging him
to deliver it to the lady, which the chaplain promised to do.

And now, leaving the good clergyman to perform this promise,


and Sir Osborne to return to his apartment, somewhat mortified at
not having had an opportunity of conversing privately with
Constance, even for a moment, we will steal quietly into the privy-
chamber of the king, and seating ourselves on a little stool in the
corner, observe all that passes between him and his minister.

"God save your royal grace!" said Wolsey, as he entered, "and


make your people happy in your long and prosperous reign!"

"Welcome back again, my good lord cardinal," replied the king;


"you have been but a truant of late. We have in many things wanted
your good counsel. But your careful letters have been received, and
we have to thank you for the renewed quiet of the West Riding."

"Happily, your grace, all is now tranquil," replied the cardinal,


"and the kingdom within itself blessed with profound peace; but yet,
my lord, even when this was accomplished, it was necessary to
discover the cause and authors of the evil, that the fire of discord
and sedition might be totally extinguished, and not, being only
smothered, burst out anew where we least expected it. This has
been done, my liege. The authors of all these revolts, the instigators
of their fellow-subjects' treason, have been discovered; and if your
grace have leisure for such sad business, I will even now crave leave
to lay before you the particulars of a most daring plot, which,
through the activity of good Sir Payan Wileton, I have been enabled
to detect."

"Without there!" cried the king, somewhat impatiently. "See that


we are not interrupted. Tell Sir Osborne Maurice that we will send
for him when we are free. Sit, sit, my Wolsey!" he continued. "Now,
by the holy faith, it grieves me to hear such things! I had hoped
that, tranquillity being restored, I should have sped over to France to
meet my royal brother Francis, with nothing but joy upon my brow.
However, you are thanked, my good lord, for your zeal and for your
diligence. We must not let the poisonous root of treason spread, lest
it grow too great a tree to be hewn down. Who are these traitors?
Ha! Have you good proof against them?"

"Such proof, my liege, that, however willing I be to doubt,


uncertainty, the refuge of hope, is denied me, and I must needs
believe. When we have nourished anything with our grace, fostered
it with kindly care, taught it to spread and become great, heaped it
with favours, loaded it with bounty, we naturally hope that, having
sowed all these good things, our crop will be rich in gratitude and
love; but sorry I am to say, that your grace's royal generosity has
fallen upon a poisoned soil, and that Edward Duke of Buckingham,
who might well believe himself the most favoured man in the realm,
now proves himself an arrant traitor."

"By heaven!" cried the king, "I have lately much doubted of his
loyalty. He has, as you once before made me observe, much
absented himself from the court, keeping, as I hear, an almost royal
state in the counties; and lately, on the pretence that he is sick, that
his physicians command him quiet, he refuses to accompany us to
Guisnes. I fear me, I fear me, 'tis his loyalty is sick. But let me hear
your reasons, my good lord cardinal. Fain would I still behold him
with an eye of favour; for he is in many things a noble and a princely
peer, and by nature richly endowed with all the shining qualities both
of the body and the mind. 'Tis sad, indeed 'tis sad, that such a man
should fall away and lose his high renown! But your reasons,
Wolsey! Give me the history."

It were needless in this place to recapitulate all that we have


seen, in the last chapter, advanced by Sir Payan Wileton to criminate
the Duke of Buckingham. Suffice it that Wolsey related to the king
the very probable tale that had been told him by the knight: namely,
that Buckingham, aspiring to the throne, affected an undue degree
of popularity with the commons, and by his secret agents rendered
them dissatisfied with the existing government, exciting them to
various tumults and revolts, of which he cited many an instance; and
that, still further, he had contrived to introduce one of the most
active agents of his treason into the court, and near to the king's
own person.

"Whom do you aim at?" cried the king. "Quick! give me his name.
I know of no such person. All about me are men of trust."

"Alas! no, my liege," answered Wolsey: "the man I mean calls


himself Sir Osborne Maurice."

"Ha!" cried Henry, starting; and then, after thinking for a moment,
he burst into a fit of laughter. "Nay, nay, my good Wolsey," he said,
shaking his head: "nay, nay, nay; Sir Osborne saved my life no
longer ago than yesterday, which looks not like treason;" and he
related to the cardinal the accident that had befallen him while
hawking.

Wolsey was somewhat embarrassed; but he replied, "We often


see that, taken by some sudden accident, men act not as they
proposed to do; and there is such a nobility in your grace's nature,
that he must be a hardened traitor indeed who could see you in
danger, and not by mere impulse hasten to save you. Perhaps such
may have been the case with this Sir Osborne, or perhaps his
master's schemes may not yet be ripe for execution: at all events,
my liege, doubt not that he is a most assured traitor."

"I cannot believe it!" cried Henry, striking the table with his hand.
"I will not believe it! By heaven! the very soul of honour sparkles in
his eye! But your proofs, lord cardinal! your proofs! I will not have
such things advanced against my faithful subjects, without full and
sufficient evidence."

The more eagerness that Henry showed in defending his young


friend, the more obnoxious did Sir Osborne become to Wolsey, and
he laid before the king, one by one, the deposition of Wilson, Sir
Payan's bailiff; several letters which Buckingham had written in
favour of the young knight; and lastly, the duke's letter to Sir
Thomas Morton, where, either by a forgery of Sir Payan Wileton's, or
by some strange chance, it appeared that Sir Osborne Maurice had
promised that within a year the duke's head should be the highest in
the realm.

While he read, Henry's brow knit into a heavy frown, and, biting
his lip, he went back to the beginning, and again read over the
papers. "Cardinal," said he, at length, "bid the page seek Pace, my
secretary, and ask him for the last letter from the Duke of
Buckingham."

Wolsey obeyed; and, while waiting for the return of the page,
Henry remained with his eyes averted, as if in deep thought, beating
the papers with his fingers, and gnawing his lip in no very placable
mood; while the cardinal wisely abstained from saying a word,
leaving the irritation of the king's mind to expend itself, without
calling it upon himself. As soon as the letter was brought, Henry laid
it side by side with those that Wolsey had placed before him, and
seemed to compare every word, every syllable, to ascertain the
identity of the handwriting. "True, by my life!" cried he, casting
down the papers. "The writing is the same; and now, my lord
cardinal, what have you farther to say? Are there any farther proofs,
ha?"

"Were there none other, your grace," replied Wolsey, "than the
duke's handwriting, and the deposition of a disinterested and
respectable witness, who can have no enmity whatever against this
Sir Osborne Maurice, and who probably never saw him but on the
two occasions he mentions, I think it would be quite sufficient to
warrant your grace in taking every measure of precaution. But there
is another witness, whom, indeed, I have not seen, but who can
give evidence, I understand, respecting the conduct of the person
accused towards the Rochester rioters. Knowing how much your
grace's wisdom passeth that of the best in the realm, I have dared
to have this witness (a most honourable priest) brought hither,
hoping that the exigency of the case might lead you to examine him
yourself, when, perhaps, your royal judgment may elicit more from
him than others could do."

"You have done wisely, my good lord cardinal," replied Henry,


whose first irritation had now subsided. "Let him be called, and bid
your secretary take down his deposition, for 'tis not fitting that mine
be so employed."

At the command of Wolsey, one of the pages went instantly to


seek the priest, who, by the care and despatch of Sir Payan, had
been sent down with all speed, and was now waiting with the
cardinal's attendants in no small surprise and agitation, not being
able to conceive why he was thus hurried from one place to another,
and breathing also with some degree of alarm in the unwonted
atmosphere of a court. On being ushered into the royal presence,
the worthy man fell down upon both his knees before Henry, and,
clasping his hands, prayed for a blessing on his head with such
fervour and simplicity that the monarch was both pleased and
amused.
"Rise, rise, good man!" said the king, holding out his hand for him
to kiss: "we would speak with you on a business of import. Nay, do
not be alarmed. We know your worth, and purpose to reward you.
Place yourself here, master secretary, and take down his replies. Sit,
my good lord cardinal; we beg you to be seated."

As soon as Wolsey had taken a low seat near the king, and the
secretary, kneeling on one before the table, was prepared to write,
Henry again proceeded, addressing the priest, who stood before him
the picture of a disquieted spirit.

"Say, do you know one Sir Osborne Maurice?" demanded the king.

"Yes, surely, please your royal grace," replied the priest. "At least
that was the name which his attendants gave to the noble and
courageous knight that saved me from the hands of the Rochester
shipwrights."

"First," said Wolsey, "give us your name, and say how you came
to fall into the hands of these rebellious shipwrights."

"Alas! your grace," answered the priest, "I am a poor priest of


Dartford, my name John Timeworthy; and hearing that these poor
misguided men at Rochester were in open rebellion against the
government, from lack of knowledge and spiritual teaching, I
resolved to go down amongst them and preach to them peace and
submission. I will not stay to say how and where I found them; but
getting up upon a bench that stood hard by, under an apple-tree, I
gathered them round me like a flock of sheep, and began my
discourse, saying, 'Woe! woe! woe! Woe unto ye, shipwrights of
Rochester, that you should arm yourselves against the king's grace!
You are like children, that must fain eat hot pudding, and burn their
mouths withal; for ye will cry, and ye will cry, till the sword fall upon
you; and then, when Lord Thomas comes down with his men-at-
arms, ye will turn about and fly; and the spears will stick in your
hinder parts, and ye shall be put to shame: for though he have but
hundreds, and ye have thousands, his are all men of the bow and of
the spear, and ye know no more of either than a jackass does of the
harp and psaltery.' And thereupon, your grace, they that I took for
strayed sheep showed themselves to be a pack of ravening wolves,
for they haled me down from the bench, and beat me unmercifully,
and putting a halter round my neck, led me along to hang me up, as
they vowed, in sight of Rochester Castle; when, just as they were
dragging me along, more dead than alive, across a little green, the
knight, Sir Osborne Maurice, came up, and, as I said, rescued me;
and for a surety he is a brave and generous knight, and well
deserving your grace's favour."

"By my faith, I have always thought so," said Henry. "What say
you now, cardinal? Question him yourself, man."

Wolsey eagerly snatched at the permission, for he plainly saw that


the matter was not proceeding to his wish. "Pray, my good Master
Timeworthy," said he, "how was it that this Sir Osborne rescued
you? Did he put his lance in rest, and charge the whole multitude,
and deliver you from their hands?"

"Not so! not so!" cried the priest. "He did far more wisely, for
there would have been much blood spilt; but he sent forward one,
who seemed to be his shield-bearer, who shook hands with the chief
of the rioters, and spoke him fair; and then the knight came forward
himself, and spoke to him; and the chief of the rioters cried with a
loud voice to his people, that this was not Lord Thomas, as they had
thought, but a friend and well-beloved of the good Duke of
Buckingham; and it was wonderful how soon the eloquence of that
young man worked upon the multitude, and made them let me go.
He was, indeed, a youth of a goodly presence, and fair to look upon,
and had something noble and commanding in his aspect; and his
words moved the rioters in the twinkling of an eye, and made them
wholly change their purpose."
Henry's brow, which had cleared during the former part of the
priest's narration, now grew doubly dark and cloudy; and he
muttered to himself, "Too clear! too clear!" while Wolsey proceeded
to question the priest more closely.

"Indeed, your grace," replied he, in answer to the cardinal's more


minute questions, "I can tell you no more than I have told; for, as I
said, I was more dead than alive all the time, till they gave me up to
the knight, and did not hear half that passed."

"And what did you remark after you were with the knight?"
demanded Wolsey. "Was there no particular observation made on
the whole transaction?"

"Not that I can call to mind," answered the priest. "All I remember
is, that they seemed a very merry party, and laughed and joked
about it; which I, being frightened, thought almost wicked, God
forgive me! for it was all innocency and high blood of youth."

"Well, sir," said Wolsey, "you may go. Go with him, secretary; and
see that he be well tended, but allowed to have speech of no one."

The priest and the secretary withdrew in silence; and no sooner


were they gone, than, abandoning his kingly dignity, Henry started
from his seat, and strode up and down the room in one of those fits
of passion which, even then, would sometimes take possession of
him. At length, stopping opposite Wolsey, who stood up the moment
the king rose, he struck the table with his clenched hand. "He shall
die!" cried he; "by heaven, he shall die! Let him be attached, my
Wolsey."

"My sergeant-at-arms is with me, your grace," replied the


cardinal, "and shall instantly execute your royal will. Better arrest
him directly, lest he fear and take flight."

"Whom mean you?" cried the king. "Ha! I say attach Edward
Bohun, Duke of Buckingham."
"In regard to the Duke of Buckingham, my liege," replied Wolsey,
less readily than he had before spoken, "will you take into your royal
consideration whether it may not be better to suffer him to proceed
a while with his treasonous schemes? for I question if the evidence
we have at present against him would condemn him with the peers."

"But he is a traitor," cried Henry; "an evident traitor; and, by my


faith! shall suffer a traitor's death."

"Most assuredly he is a black and heinous traitor," answered


Wolsey. "And yet your grace will think what a triumph it would be for
him if his peers should pronounce him innocent. He has store of
friends among them. Far better let him proceed yet a while, and,
with our eyes upon him, watch every turn of his dark plot, and seize
him in the midst, when we shall have such proof that even his
kindred must, for very shame, pronounce his guilt. In the mean
time, I will ensure that he be so strictly guarded that he shall have
power to do no evil."

"You are right, my Wolsey; you are right!" cried the king, seating
himself, and laying his hand upon the papers; "let it be conducted as
you say. But see that he escape not, for his ingratitude adds another
shade to what is black itself. As to this Sir Osborne Maurice, 'tis a
noble spirit perverted by that villain Buckingham. I have seen and
watched the seeds of many virtues in him."

"It must be painful, then, for your grace to command his arrest,"
said Wolsey; "and yet he is so near your royal person, and his
treason is so manifest, that the very love of your subjects requires
that he should suffer death."

"And yet," replied Henry, fixing his eye upon the cardinal, and
speaking emphatically; "and yet, even now I feel the warm blood of
the English kings flowing lightly in my veins, which but for him would
have been cold and motionless: and shall I take his life that has
saved mine? No, Wolsey, no! It must not be! He has been misled,
but is not wicked."

"Still, your grace's justice requires," said Wolsey (pardon me my


boldness), "that he should undergo his trial. Then, if condemned,
comes in your royal mercy to save him; saying to him, You are
judged for having been a traitor, you are pardoned for having saved
your king."

"But be assured, my Wolsey," replied Henry, "that if his trial were


to take place now, the great traitor Buckingham will take alarm, and
either endeavour to do away all evidence of his treason, or take to
flight and shelter himself from justice."

"No need that his trial be immediate," answered the cardinal; "if
your grace permits, he shall be committed privately to the Tower,
and there await your return from France; by which time, depend on
it, the Duke of Buckingham will have given further tokens of his mad
ambition, and both may be tried together. Then let the greater
traitor suffer and the lesser find grace, so that your royal justice and
your clemency be equally conspicuous."

"Be it so, then," said the king; "though in truth, good cardinal, it
grieves me to lose this youth. He is, without exception, the best
lance in Christendom, and would have done our realm much credit in
our journey to France: I say it grieves me! Ay, heartily it grieves
me!"

"Nay, your grace," said Wolsey, "you will doubtless find a


thousand as good as he."

"Not so! not so, lord cardinal!" cried Henry; "these are things not
so easily acquired as you churchmen think. I never saw a better
knight. When his lance breaks in full course, you shall behold his
hand as steady as if it held a straw: nor knee, nor thigh, nor heel
shall shake; and when the toughest ash splinters upon his casque,
he shall not bend even so much as a strong oak before a summer
breeze. But his guilt is clear, so the rest is all nought."

"Then I have your grace's commands," said Wolsey, "to commit


him to the Tower. He shall be attached directly by the sergeant-at-
arms, and sent down by the turn of the tide."

"Hold, hold!" cried the king; "not to-night, good Wolsey. Before
we fly our hawk we cry the heron up, and he shall have the same
grace. To-morrow, if he be still found, arrest him where you will; but
for to-night he is safe, nor must his path be dogged. He shall have
free and fair start, mark me, till tomorrow at noon; then slip your
greyhounds on him, if you please."

"But, your grace," cried Wolsey, "if you let him----"

"It is my will," said the king, his brow darkening. "Who shall
contradict it? Ha! See that it be obeyed exactly, my lord!"

"It shall, your grace," said Wolsey, bending his head with a
profound inclination. "Your will is law to all your faithful servants; but
only let your noble goodness attribute to my deep love for your royal
person the fear I have that this traitorous agent of a still greater
traitor may be tempted in despair, if he find that he is discovered, to
attempt some heinous crime against your grace."

"Fear not, man! fear not!" replied the king. "He, that when he
might have let me die, risked his own life to save mine, will never
arm his hand against me: I fear not, cardinal. So be you at ease. But
return to London; see that Buckingham be closely watched; and be
sure that no preparation be wanting for the meeting with Francis of
France. Be liberal, be liberal, lord cardinal! I would not that the
nobles of France should say they had more gold than we. Let
everything be abundant, be rich, and in its flush of newness; and as
to Sir Osborne Maurice, arrest him to-morrow, if he be still here. Let
him be fairly tried, and if he come out pure, well. Yet still, if he be
condemned, his own life shall be given him as a reward for mine.
However, till tomorrow let it rest. It is my will!"

Though Wolsey would have been better pleased to have had the
knight safely in the Tower, yet, even in case of his making his escape
before the next morning, his great object was gained, that of
banishing from the court for ever one whose rapid progress in the
king's regard bade fair, with time, to leave every one behind in
favour. He therefore ceased to press the king upon the subject,
especially as he saw, by many indubitable signs, that Henry was in
one of those imperious moods which would bear no opposition. A
few subjects of less import still remained to be discussed, but the
monarch bore these so impatiently, that Wolsey soon ceased to
importune him upon them; and resolving to reserve all further
business for some more auspicious day, he rose, and taking leave
with one of those refined, yet high-coloured, compliments which no
man was so capable of justly tempering as himself, he left the royal
presence, and proceeded to another part of the palace on business
whose object is intimately allied to the present history, as we shall
see hereafter.

CHAPTER XXV.

And knowing this, should I yet stay,


Like such as blow away their lives,
Enamoured of their golden gyves?--Ben Jonson.

Away! though parting be a fretful corrosive,


It is applied to a deathful wound.--Shakspere.
Who would be a king if he could help it? When Wolsey had left
him, Henry once more raised the papers which lay upon the table,
and read them through; then leant his head upon his hand, and
passed some moments in deep and frowning meditation. "No!" said
he, "no! I will not show them to him, lest he warn the traitor
Buckingham. Ho, without! Tell Pace to come to me;" and again
falling into thought, he remained musing over the papers with bent
brows and an absent air, till the secretary had time to obey his
summons. On his approach, the good but timid Pace almost
trembled at the angry glow he saw upon the king's face; but he was
relieved by Henry placing in his hands the papers which Wolsey had
left, bidding him have good care thereof.

Pace took the papers in respectful silence, and waited an instant


to see whether the king had further commands; but Henry waved
his hand, crying, "Begone! leave me, and send the page."

The page lost not a moment in appearing; for the king's hasty
mood was easily discernible in his aspect, and no one dared, even
by an instant's delay, to add fuel to the fire which was clearly
burning in his bosom; but still Henry allowed him to wait for several
minutes. "Who waits in the ante-chamber?" demanded he, at length.

"Sir Charles Hammond, so please your grace," replied the page.

"And where is Denny?" asked the king. "Where is Sir Anthony


Denny, ha?"

"He has been gone about an hour, your grace," replied the page.

"They hold me at nought!" cried Henry. "Strike his name from the
list! By my life, I will teach him to wait! Go call Sir Osborne Maurice
to my presence," and rising from his seat, he began again to pace
the apartment.

The page, as he conducted the young knight to the hall in which


Henry awaited him, took care to hint that he was in a terrific mood,
with that sort of eagerness which all vulgar people have to spread
evil tidings. The knight, however, asked no question and made no
comment, and passing through the door which he had seen give
admission to the priest about an hour before, he entered the ante-
chamber, in which was seated Sir Charles Hammond, who saluted
him with a silent bow. Proceeding onward, the page threw open the
door of the privy-chamber, and Sir Osborne approached the king, in
the knitting of whose brow, and in the curling of whose lip, might be
plainly seen the inward irritation of his impetuous spirit. As he came
near, Henry turned round, and fixed his eye upon him; and the
knight, not knowing what might be the cause or what the
consequence of his anger, bent his knee to the ground, and bowing
his head, said, "God save your grace!"

"Marry, thou sayest well!" cried Henry. "We trust he will, and
guard us ever against traitors! What say you?"

"If ever there be a man so much a traitor to himself," replied Sir


Osborne, "as to nourish one thought against so good a king, oh,
may his treason fall back upon his own head, and crush him with the
weight!"

"Well prayed again," said Henry, more calmly. "Rise, rise, Sir
Osborne; we must speak together. Give me your arm. We cannot sit
and speak when the heart is so busy. We will walk. This hall has
space enough," and with a hurried pace he took one or two turns in
the chamber, fixing his eyes upon the ground, and biting his lip in
silence. "Now, by our Lady!" cried he at length, "there are many
men in this kingdom, Sir Osborne Maurice, who, seeing us here,
holding your arm and walking by your side, would judge our life in
peril."

Sir Osborne started, and gazed in Henry's face with a look of no


small surprise.
"Did I but know of any one," said he, at length, "who could
poison your royal ear with such a tale, were it other than a
churchman or a woman, he should either confess his falsehood or
die upon my sword. But your grace is noble, and believes them not.
However," he continued, unbuckling his sword and laying it on the
table as far away as possible, "on all accounts I will put that by.
There lays the sword that was given me by an emperor, and here is
the hand that saved a king's life; and here," he continued, kneeling
at the king's feet, "is a heart as loyal as any in this realm, ready to
shed its best blood if its king command it. But tell me, only tell me,
how I have offended."

"Rise, sir knight," said the king. "On my life, I believe you so far,
that if you have done wrong, you have been misled; and that your
heart is loyal I am sure: yet listen. You came to this court a stranger;
in you I found much of valour and of knightly worth. I loved you,
and I favoured you; yet now I find that you have in much deceived
me. Speak not, for I will not see in you any but the man who has
saved my life; I will know you for none other. Say, then, Sir Osborne,
is not life a good return for life? It is? ha?"

"It is, my liege," replied Sir Osborne, believing his real name
discovered. "Whatever I have done amiss has been but error of
judgment, not of heart, and surely cannot be held as very deep
offence in eyes so gracious as my noble king's."

"We find excuses for you, sir, which rigorous judges might not
find," replied the monarch; "yet there are many who strive to make
your faults far blacker than they are, and doubtless may urge much
against you; but hitherto we stand between you and the law, giving
you life for life. But see you use the time that is allowed you well, for
to-morrow, at high noon, issues the warrant for your apprehension,
and if you make not speed to leave this court and country, your fate
upon your head, for you have warning."
Sir Osborne was struck dumb, and for a moment he gazed upon
the king in silent astonishment. "I know not what to think," he cried,
after a while; "I cannot believe that a king famous for his clemency,
can see in my very worst crime aught but an error. Your grace has
said that many strive to blacken me; still humbly at your feet let me
beseech you to tell me of what they do accuse me."

"Of many rank offences, sir!" replied the king, somewhat


impatiently; "offences of which you might find it hard to wash
yourself so clear as not to leave enough to weigh you down.
However, 'tis our will that you depart the court, without further
sojourn; and if you are wise, you'll speed to leave a country where
you may chance to find worse entertainment and a harder lodging if
you stay. Go to the keeper of our private purse, who will give a
thousand marks to clear your journey of all cost; and God befriend
you for the time to come!"

"Nay, your grace," replied Sir Osborne, "poor as I came I'll go; but
thus far richer, that for one short month I won a great king's love,
and lost it without deserving; and if to this your grace will add the
favour to let me once more kiss your royal hand, you'll send me
grateful forth."

Henry held out his hand towards him. "By my faith," cried he, "I
do believe him honest! But the proofs! the proofs! Go, go, Sir
Osborne; I judge not harshly of you. You have been misled; but fly
speedily, I command you; for your own sake, fly!"

Sir Osborne raised himself, took his sword from the table, and,
with a low obeisance to the king, quitted the room, his heart far too
full to speak with any measure what he felt.

His hopes all broken, his dream of happiness dispelled like a


wreath of morning mist in the sunshine, the young knight sought his
chamber, and casting himself in a seat, leant his head upon his
hands, in an attitude of total despondency. He did not think; for the
racking images of despair that hurried through his brain were very
different from the defined shapes of the most busy thought. His
bosom was a chaos of dark and gloomy feelings, and it was long
before reason lent him any aid to arrange and disentangle his ideas.
As it did so, however, the thought of whither he should fly presented
itself, and his first resolution was to go to his father in Wales; but
then, to be the bearer of such news! it was more than he could
undertake. Besides, as he reflected, he saw that, use what speed he
might, his course would be easily tracked in that direction, and that
the facilities which the messengers of the government possessed of
gaining fresh horses would soon enable them to overtake and arrest
him if the warrant were issued the next day at noon, as the king had
said, and followed up with any degree of alacrity. That it would be so
he had no reason to doubt, attributing, as he did, the whole of his
misfortune to the hatred and jealousy of Wolsey; whose haste to
ruin him had been sufficiently evinced by his having begun and
completed it within one day after his arrival from York. These
thoughts brought on others; and not knowing the stinging impulse
of a favourite's jealousy, he pondered over the malice of the
cardinal, wondering whether in former days his father might have
offered the then rising minister either offence or injury, and thus
entailed his evil offices on himself and family. But still the question,
whither he should fly, returned; and after much consideration he
resolved that it should be to Flanders, once more to try the fortune
of his sword; for though peace nominally subsisted between the
French king and the new emperor, it was a peace which could be but
of short duration, and it was even then interrupted by continual
incursions upon each other's territories, and incessant violation of
the frontier by the various garrisons of France and Burgundy. Once
arrived, he would write, he thought, to his father, who would surely
join him there, and they would raise their house and name in a
foreign land. But Constance de Grey--could she ever be his? He
knew not; but at her very name Hope relighted her torch, and he
began to dream again.
As he thought thus, he raised his eyes, and perceived his faithful
attendant Longpole watching him with a look of anxious expectation,
waiting till his agitated reverie should end. "How! Longpole!" said he.
"You here? I did not hear you come in."

"I have been here all the time, your worship," replied the yeoman.
"And I've made some noise in the world, too, while you have been
here, for I let all the armour fall in that closet."

"I did not hear you," said the knight. "My thoughts were very
busy. But, my good Heartley, I am afraid the time is come that we
must part."

"By my faith, it must be a queer time, then, your worship!"


answered Longpole; "for it is not every-day weather that will make
me quit you, especially when I see you in such a way as you were
just now."

"But, my good Longpole," answered the knight, "I am ruined. The


king has discovered who I really am; Wolsey has whetted his anger
against me, and he has banished me his court, bidding me fly
instantly, lest I be to-morrow arrested, and perhaps committed to
the Tower. I must therefore quit this country without loss of time,
and take my way to Flanders, for my hopes here are all at an end.
Wolsey is too powerful to be opposed."

"Well, then, my lord," said Longpole, "I will call you by your real
name now; and so I'll go and saddle our horses, pack up as much as
I can, and we'll be off in a minute."

"But, my good Longpole," said his master, "you do not think what
you are doing. Indeed, you must not leave your country and your
friends, and that poor girl Geraldine, to follow a man ruined in
fortune and expectations, going to travel through strange lands,
where he knows not whether he may find friends or enemies."
"More reason he should have a companion on the road," replied
Longpole. "But, my lord, my determination is made. Where you go,
there will I go too; and as to little Mistress Geraldine, why, when
we've made a fortune, which I am sure we shall do, I'll make her
trot over after me. But, as I suppose there is but little time to spare,
I will go get everything into order as fast as possible. Carpe diem, as
good Dr. Wilbraham used to say to me when I was lazy. There is
your lordship's harness. If you can manage to pop on the breast and
back pieces, I will be back directly."

"Nay," said the knight, "there is yet one person I must see.
However, be not long, good fellow, for I shall not stay. Give me that
wrapping cloak with the hood."

Longpole obeyed; and enveloping himself in a large mantle, which


he had upon a former occasion used to cover his armour, in one of
those fanciful justs where every one appeared disguised, the knight
left his own apartments, and proceeded to those of Lady Constance
de Grey. Many were the sounds of mirth and merriment which met
his ears as he passed by the various ranges of apartments, jarring
harshly with all his own sorrowful feelings, and in the despondency
of his mind he marvelled that any but idiots or madmen could
indulge in laughter in a world so full of care. Hurrying on to avoid
such inharmonious tones, he approached the suite of rooms
appropriated to Lady Constance, and was surprised at finding the
door open. Entering, nothing but confusion seemed to reign in the
ante-chamber, where her maids were usually found employed in
various works. Here stood a frame for caul-work, there one for
embroidery; here a cushion for Italian lace thrown upon the ground;
there a chair overturned; while two of the maids stood looking out of
the window (to make use of the homely term), crying their eyes out.

"Where is your mistress?" demanded Sir Osborne, as he entered;


the agitation of his own feelings, and the alarm he conceived from
the strange disarray of the apartment, making him stint his form of
speech to the fewest words possible.
"We do not know, sir," replied one of the desolate damsels. "All
that we know is, that she is gone."

"Gone!" cried Sir Osborne. "Gone! In the name of heaven, whither


is she gone? Who is gone with her?"

"Jesu Maria, sir! don't look so wild," cried the woman, who
thought herself quite pretty enough, even in her tears, to be a little
familiar. "Dr. Wilbraham is with the Lady Constance, and so is
Mistress Margaret, and therefore she is safe enough, surely."

"But cannot you say whither she is gone?" cried the knight.
"When did she go? How?"

"She went but now, sir," replied the woman. "She was sent for
about an hour or more ago to the little tapestry-hall, to speak with
my lord cardinal; and after that she came back very grave and
serious, and made Mistress Margaret pack up a great parcel of
things, while she herself spoke with Dr. Wilbraham; and when that
was done, they all three went away together; but before she went
she gave each of us fifty marks a-piece, and said that she would
give us news of her."

"Did she not drop any word in regard to her destination?"


demanded Sir Osborne. "Anything that might lead you to imagine
whither she was gone?"

"Mistress Margaret said they were going to London," said the


other girl, turning round from the window, and speaking through her
tears. "She said that they were going because such was my lord
cardinal's will. But I don't believe it, for she said it like a lie; and I'm
sure I shall never see my young lady again. I'm sure I shan't! So
now, sir knight, go away and leave us, for we can tell you nothing
more."

The knight turned away. "Oh, Constance! Constance!" thought he,


as he paced back to his apartments; "will you ever be able to resist
all the influence they may bring against you? When you hear, too, of
your lover's disgrace! Well, God is good, and sometimes joy shines
forth out of sorrow, like the sun that dispels the storm." As he
thought thus, the prediction of Sir Cesar, that their misfortune should
be but of short duration, came across his mind. "The evil part of his
prophecy," thought he, "is already on my head. Why should I doubt
the good? Come, I will be superstitious, and believe it fully; for hope
is surely as much better than fear as joy is better than sorrow. Will
Constance ever give her hand to another? Oh, no, no! And surely,
surely, I shall win her yet."

Of all the bright gifts with which heaven has blessed our youth,
there is none more excellent than that elasticity of spirit which
rebounds strongly from the depressing load of a world's care, and
after the heaviest weight of sorrow, or the severest stroke of
disappointment, raises us lightly up, and gives us back to hope and
to enjoyment. It is peculiar to youth, and it is peculiar to good
conduct; for the reiterated burdens that years cast upon us as they
fly gradually rob the spring of expectation of its flexibility, and vice
feels within itself that it has not the same right to hope as virtue. Sir
Osborne's spirit was all rebound; and though surrounded with
doubts, with difficulties, and with dangers, it was not long before he
was ready to try again the wide adventurous world, with unabated
vigour of endeavour, though rebuffed in his first endeavours and
disappointed in his brightest expectations.

On returning to his apartment he found his faithful attendant


ready prepared; and there was a sort of easy, careless confidence in
the honest yeoman's manner, that well seconded the efforts of
reviving hope in his master's breast. It seemed as if he never
thought for a moment that want of success was possible; and,
besides, he was one of those over whom Fortune has little power. He
himself had no extraneous wants or wishes. Happy by temperament,
and independent by bodily vigour, he derived from nature all that
neither Stoic nor Epicurean could obtain by art. He was a
philosopher by frame; and more than a philosopher, as the word is
generally used, for he had a warm heart and a generous spirit, and
joined affection for others to carelessness about himself.

Such was the companion, of all others, fitted to cheer Sir Osborne
on his way; far more so than if he had been one of equal rank or
equal refinement, for he was always ready to assist, to serve, to
amuse, or advise, without sufficient appreciation of finer feelings to
encourage, even by understanding them, those thoughts upon which
the knight might have dwelt painfully in conversation with any one
else.

At the same time, Longpole was far above his class in every
respect. He had some smattering of classical knowledge, which was
all that rested with him of the laborious teaching which good Dr.
Wilbraham had bestowed upon his youth; he not only could read
and write, but had read all the books he could get at, while a
prisoner in France, and had, on more than one occasion, contrived
to turn a stanza, though neither the stuff nor the workmanship was
very good; and he had, moreover, a strange turn for jesting, which
he took care to keep in perpetual exercise. To these he joined all the
thousand little serviceable qualifications of an old soldier, and an
extraordinary fluency in speaking French, which had proved very
useful to him in many instances. Thus equipped inwardly, he now
stood before Sir Osborne, with his outward man armed in the plain
harness of a custrel, or shield-bearer, with casque and corslet,
cuissards, brassards, and gauntlets; and considering that he was
nearly six feet three inches in height, he was the sort of man that a
knight might not be sorry to see at his back in the mêlée or the
skirmish.

"Longpole," said the knight, "give me my armour; I will put it on


while you place what clothes you can in the large horsebags. But,
my good custrel, we must put something over our harness: give me
that surcoat. You have not barded my horse, I trust?"
"Indeed I have, my lord," replied he; "and depend on it you may
have need thereof. Remember how dear the barding of a horse is: I
speak of the steel, which is, in fact, the true bard, or bardo, as the
Italians call it, for the cloth that covers it is not the bard; and if you
carry the steel with you, you may as well have the silk too."

"But 'twill weary the horse," said Sir Osborne; "however, as 'tis
on, let it stay: only it may attract attention, and give too good a
track to any that follow; though, God knows, I can hardly determine
which way to turn my rein."

"To London! to London, to be sure, your worship," cried Longpole;


"that is the high road to every part on the earth, and off the earth,
and under the earth. If a man want to go to heaven, he will there
find guides; if he seek hell, he will find plenty going the same road;
and if he love this world better, there shall he meet conveyance to
every part of it. What would you think of just paying a visit to good
Master William Hans, the merchant, to see if he cannot give us a
cast over to Flanders? A thousand to one he has some vessel going,
or knows some one that has."

"Well bethought," answered Sir Osborne, slowly buckling on his


armour. "It will soon grow dusk, and then our arms will call no
attention. My hands refuse to help me on with my harness: I am
very slow. Nay, good Longpole, if you have already finished, take a
hundred marks out of that bag, which will nearly empty it, and seek
the three men the Duke of Buckingham gave me. Divide it between
them for their service; and, good Longpole, when you have done
that, make inquiries about the palace as to what road was taken by
Lady Constance de Grey and Dr. Wilbraham. Do not mention the
lady; name only Dr. Wilbraham, as if I sought to speak with him."

Longpole obeyed, and after about half-an-hour's absence


returned, tolerably successful in his inquiries; but, much to his
surprise and disappointment, he found his young lord very nearly in
the same situation in which he had left him, sitting in his chair, half
armed, with his casque upon his knee, his fine head bare, and his
eye fixed upon the fading gleams of the evening sky, where some
faint clouds just above the distant trees seemed as if lingering in the
beams of the sun's bright eye, like man still tenacious of the last ray
of hope.

"Well, Longpole," cried he, waking from his reverie, "what news?
Have you heard anything of Lady Constance?" and, as if ashamed of
his delay, he busied himself to finish the arrangement of his armour.

"Let me aid you, my lord," said Longpole, kneeling down, and


soon completing, piece by piece, what his master had left
unfinished, replying at the same time to his question. "I have spoken
with the man who carried the baggage down to the boat, my lord;
and he says that Dr. Wilbraham, Lady Constance, and one of her
women, took water about half-an-hour after the lord cardinal, and
seemed to follow his barge."

Sir Osborne fell into another reverie, from which, at last, he


roused himself with a sigh. "Well, I can do nothing," said he; "like an
angry child I might rage and struggle, but I could do no more. Were
I to stay, 'twould but be committing me to the Tower, and then I
must be still perforce----"

Longpole heard all this with an air of great edification; but when
he thought that his master had indulged himself enough, he
ventured to interrupt him by saying, "The sun, sir, has gone to bed;
had not we better take advantage of his absence, and make our way
to London? Remember, sir, he is an early riser at this time of year,
and will be up looking after us tomorrow before we are well aware."

"Ay, Longpole, ay!" replied the knight; "I will linger no longer, for
it is unavailing. The trumpet must have sounded to supper by this
time; has it not? So we shall have no idlers to gaze at our
departure."
"The trumpet sounded as I went down but now," said Longpole,
"and I met the sewer carrying in a brawn's head so like his own, that
I could not help thinking he had killed and cooked his brother: they
must be hard at his grace's liege capons even now."

"Well, I am ready," said the knight; "give me the surcoat of tawny


velvet. Now; no more feathers!" he continued, plucking from his
casque the long plume that, issuing from the crest in graceful
sweeps, fell back almost to his girdle, taking care, however, at the
same time, to leave behind a small white glove wrought with gold,
that had surrounded the insertion of the feather, and which he
secured in its place with particular attention. "Some one will have
rare pillage of this apartment," he added, looking round. "That suit
of black armour is worth five hundred marks; but it matters not to
think of it: we cannot carry them with us. The long sword and
baldrick, Longpole, and the gold spurs: I will go as a knight, at least.
Now, take the bags. I follow. Farewell, King Henry! you have lost a
faithful subject!"

Thus saying, he proceeded down the stairs after Longpole, and


following a corridor, passed by one of the small doors of the great
hall, through the partial opening of which were to be heard the rattle
and the clatter of plates, of dishes, and of knives, and the buzz of
many busy jaws. A feeling of disgust came over Sir Osborne as he
heard it, he scarce knew why, and stayed not to inquire, but striding
on, came speedily to the stable-yard, and was crossing towards the
building in which his horses stood, when he observed a man
loitering near the door of the stable, whom he soon discovered to be
one of the yeomen given him by the Duke of Buckingham.

"On, Longpole!" cried the knight; "on, and send him upon some
errand, for I am in no fit mood to speak with him now." While Sir
Osborne drew back into the doorway, Longpole advanced, and in a
moment after the man was seen traversing the court in another
direction. The knight then proceeded, the horses were brought forth,
and springing into the saddle, Sir Osborne, with a sigh given to the
recollection of lost hopes, touched his charger with the spur, and
rode out of the gates. Longpole followed, and in a few minutes they
were on the high road to London.

CHAPTER XXVI.

He is a worthy gentleman,
Exceedingly well read, and profited
In strange concealments.--Henry IV.

It was hardly night when Sir Osborne departed; a faint and


diminishing blush still tinged the eastern sky; the blackbird was still
singing his full round notes from every thicket; and not a star had
yet veivntured forth upon the pathway of the sun, except one, that,
bright and sweet even then, seemed like a fond and favoured child
to the monarch of the sky, following fearlessly on his brilliant steps,
while others held aloof. The calm of the evening sank down gently
on the young adventurer's heart: it was so mild, so placid; and
though, perhaps, pensive and tinged with melancholy, yet there was
a sort of promise in that last smile of parting day, which led Hope
forward, and told of brighter moments yet to come. For some time
the knight indulged in vague dreams, made up, as indeed is the
whole dream of human life, of hopes and fears, expectation and
despondency; then giving up thought for action, he spurred forward
his horse, and proceeded as fast as he could towards London.
Longpole followed in silence; for, in spite of all his philosophy, he felt
a sort of qualm at the idea of the long period which must intervene
ere he could hope to see his pretty Geraldine, that took away several
ounces of his loquacity.
London, at length, spread wide before them, and after some
needless circumambulation, owing to the knight's total ignorance of
the labyrinthian intricacies of the city, and the dangerous littleness of
Longpole's knowledge thereof, they at length reached Gracious
Street, and discovered the small, square paved court, long since
built over, and I believe now occupied by a tea-dealer, but which
then afforded a sort of area before the dwelling of the Flemish
merchant, William Hans. On the left hand, nearest the river, was
situated the counting-house; and to the front, as well as to the right,
stretched a range of buildings which, from their Polyphemus-like
appearance, having but one window or aperture in the front (except
the door), the knight concluded to be those warehouses whose
indiscriminate maw swallowed up the produce of all parts of the
earth. Over the counting-house, however, appeared several smaller
windows, principally glazed, and through one of these shone forth
upon the night the light of a taper, giving notice that some one still
waked within. While Longpole dismounted, and knocked with the hilt
of his dagger against a little door by the side of that which led to the
counting-house, the knight watched the light in the window; but he
watched and Longpole knocked in vain; for neither did the light
move nor the door open, till Sir Osborne bethought him of a
stratagem to call the merchant's attention.

"Make a low knocking against the windows of the counting-house,


Longpole," said he, "as if you were trying to force them. I have
known these money-getters as deaf as adders to any sound but that
which menaced the mammon."

Longpole obeyed, and the moment after the light moved. "Hold!
hold!" cried the knight, "he hears;" and the next moment the
casement window was pushed open, through which the head of the
good merchant protruded itself, vociferating, "Who's tere? What do
you want? I'll call te watch. Watch! Watch!"

"Taisez-vous!" cried the knight, addressing him in French, not


being able to speak the Brabant dialect of the merchant, and yet not
wishing to proclaim his errand aloud in English. "Nous sommes amis;
descendez, Guillaume Hans: c'est le Sire de Darnley."

"Oh! I'll come down, I'll come down," cried the merchant "Run,
Skippenhausen, and open te door. I'll come down, my coot lord, in a
minute."

The two travellers had not now long to wait; for in a moment or
two the little door at which Longpole had at first in vain applied for
admission was thrown open by a personage, the profundity of whose
nether garments, together with his long waistcoat, square-cut blue
coat, with the seams, and there were many, all bound with white
lace, induced Sir Osborne immediately to write him down for a Dutch
navigator. Descending the stairs, immediately behind this first
apparition, came the merchant himself, with his black gown, which
had probably been laid aside for the night, now hurried on, not with
the most correct adjustment in the world, for it looked very much as
if turned inside out, which might well happen to a robe, the sleeves
of which were not above six inches long. Sir Osborne, however, did
not stay to investigate the subject very minutely; but explaining to
the good merchant that he had something particular to say to him,
he was conducted into the counting-house, where he informed him
as succinctly as possible of what had occurred and what he desired.
Good Master Hans was prodigal of his astonishment, which vented
itself in various exclamations in Flemish, English, and French; after
which, coming to business, as he said, he told the knight that he
could put up his horses in the same stable where he kept his drays,
and that after that they would talk of the rest. "But on my wort, my
coot lord," said he, "I must go with your man myself, for there is not
one soul in the place to let him in or out of the stable, which is
behind the house."

The most troublesome part of the affair for the moment was to
take off the bard or horse armour that covered the knight's charger,
as it could not be left in the stable till the next morning, when the
merchant's carters would arrive; and poor William Hans was
desperately afraid that the round of the watch would pass while the
operation was in execution, and suppose that he was receiving some
contraband goods, which might cause a search the next day.

The business, however, was happily accomplished by the aid of


the Dutch captain, who, seeing that there was something mysterious
going forward, and having a taste that way, gave more active
assistance than either his face or figure might have taught one to
expect.

He also it was who, while the good merchant, with the candle in
his hand, led our friend Longpole with the horses to the stable,
conducted the knight up-stairs into the room where they had first
discovered the light, and invited him, in extremely good English, to
be seated. By the appearance of the chamber it seemed that Master
Hans had been preparing to make great cheer for his captain; for
various were the flagons and bottles that stood upon the table,
together with trenchers and plates unused, and a pile of manchet
and spice bread, with other signs and prognostications of a rere-
supper; not to mention an immense bowl which stood in the midst,
and whose void rotundity seemed yearning for some savoury mass
not yet concocted.

It was not long before the merchant re-appeared, accompanied


by Longpole, who, according to the custom of those days, when
many a various rank might be seen at the same board, seated
himself at the farther end of the table, after having taken his
master's casque, and soon engaged the Dutch captain in
conversation, while the knight consulted with William Hans regarding
the means of quitting England as speedily as possible.

"It is very unlucky you did not let me know before," said the
merchant, "for we might easily have cot the ship of my coot friend
Skippenhausen there ready to-day, and you could have sailed to-
morrow morning by the first tide. You might trust him; you might
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookmasss.com

You might also like